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.
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
---
|
|
|
|
- name: "Checkin if awx in k8s cluster is available"
|
|
delegate_to: localhost
|
|
uri:
|
|
url: "{{ shared_service_kube_url_awx }}/api/login"
|
|
method: GET
|
|
user: "{{ awx_admin_username }}"
|
|
password: "{{ awx_admin_password }}"
|
|
return_content: true
|
|
validate_certs: false
|
|
force_basic_auth: yes
|
|
status_code: 200
|
|
register: check_awx_available
|
|
retries: 15
|
|
delay: 10
|
|
until: check_awx_available.status in [200]
|
|
when:
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
tags:
|
|
- never # shouldn't be done automatically due to removal logic
|
|
- update_awx_config
|
|
|
|
- name: "Authenticating with awx server"
|
|
delegate_to: localhost
|
|
uri:
|
|
url: "{{ shared_service_kube_url_awx }}/api/login"
|
|
method: GET
|
|
user: "{{ awx_admin_username }}"
|
|
password: "{{ awx_admin_password }}"
|
|
return_content: true
|
|
validate_certs: false
|
|
force_basic_auth: yes
|
|
status_code: 200
|
|
register: authentication_response
|
|
tags:
|
|
- never # shouldn't be done automatically due to removal logic
|
|
- update_awx_config
|
|
|
|
- name: DEBUG
|
|
debug:
|
|
msg: "{{ authentication_response }}"
|
|
when:
|
|
- debug
|
|
tags:
|
|
- never # shouldn't be done automatically due to removal logic
|
|
- update_awx_config
|
|
|
|
- name: "Configure some stuff"
|
|
include_tasks: awx-config.yml
|
|
vars:
|
|
awx_rest_api_access_user: "{{ awx_admin_username }}"
|
|
awx_rest_api_access_pw: "{{ awx_admin_password }}"
|
|
when:
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
args:
|
|
apply:
|
|
tags:
|
|
- update_awx_config
|
|
tags:
|
|
- never # shouldn't be done automatically due to removal logic
|
|
- update_awx_config
|