update deploy role for new awx token authentication method

This commit is contained in:
Michael Collins
2021-10-01 18:56:38 +08:00
parent 9a4187c852
commit c8744ef9a9
20 changed files with 137 additions and 128 deletions

View File

@@ -6,6 +6,15 @@
exclusive: yes
key: "{{ lookup('file', '/var/lib/awx/projects/hosting/client_public.key') }}"
- name: Delete the AWX session token for executing modules
awx.awx.tower_token:
description: 'AWX Session Token'
scope: "write"
state: absent
existing_token_id: "{{ awx_session_token.ansible_facts.tower_token.id }}"
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
- name: Set boolean value to exit playbook
set_fact:
end_playbook: true