-
Notifications
You must be signed in to change notification settings - Fork 6
/
api-controller.yml
39 lines (35 loc) · 1.04 KB
/
api-controller.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: Query the Automation Controller API w/ User Token
hosts: localhost
gather_facts: false
vars:
token: 5qDAV0DUgwe1IcHAuUeEZnzET0Gves
tasks:
- name: Query Automation Controller API - Example 1
ansible.builtin.uri:
url: https://aap.ludwar.ca/api/v2/projects
method: GET
return_content: true
headers:
Content-Type: application/json
Authorization: Bearer 5qDAV0DUgwe1IcHAuUeEZnzET0Gves
validate_certs: false
no_log: true
register: projects
- name: Display query results
ansible.builtin.debug:
var: projects
- name: Query Automation Controller API - Example 2
ansible.builtin.uri:
url: https://aap.ludwar.ca/api/v2/projects
body_format: json
method: GET
return_content: true
headers:
Authorization: "Bearer {{ token }}"
validate_certs: false
no_log: true
register: projects2
- name: Display query results
ansible.builtin.debug:
var: projects2