You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
|
|
- name: "Fetch all {{ awx_rest_api_type }} ids"
|
|
delegate_to: localhost
|
|
uri:
|
|
url: "{{ shared_service_kube_url_awx }}/api/v2/{{ awx_rest_api_type }}/"
|
|
method: GET
|
|
user: "{{ awx_rest_api_access_user }}"
|
|
password: "{{ awx_rest_api_access_pw }}"
|
|
headers:
|
|
Content-Type: "application/json"
|
|
Accept: "application/json"
|
|
body_format: "json"
|
|
force_basic_auth: true
|
|
validate_certs: false
|
|
status_code: 200
|
|
register: response
|
|
tags:
|
|
- awx_config
|
|
|
|
- name: "Remove all {{ awx_rest_api_type }}" # noqa ignore-errors
|
|
delegate_to: localhost
|
|
uri:
|
|
url: "{{ shared_service_kube_url_awx }}{{ item.url }}"
|
|
method: DELETE
|
|
user: "{{ awx_rest_api_access_user }}"
|
|
password: "{{ awx_rest_api_access_pw }}"
|
|
headers:
|
|
Content-Type: "application/json"
|
|
Accept: "application/json"
|
|
body_format: "json"
|
|
force_basic_auth: true
|
|
validate_certs: false
|
|
status_code: 204
|
|
tags:
|
|
- awx_config
|
|
loop: "{{ response.json.results }}"
|
|
loop_control:
|
|
label: "{{ item.url }}"
|
|
# Ignore errors due to some elements can't be deleted
|
|
ignore_errors: true
|