2021-10-10 07:23:49 +02:00
|
|
|
---
|
2021-09-19 11:12:12 +02:00
|
|
|
|
|
|
|
- name: Set the new authorized key taken from file
|
|
|
|
authorized_key:
|
|
|
|
user: root
|
|
|
|
state: present
|
2022-02-05 22:32:54 +02:00
|
|
|
exclusive: true
|
2021-09-19 11:12:12 +02:00
|
|
|
key: "{{ lookup('file', '/var/lib/awx/projects/hosting/client_public.key') }}"
|
|
|
|
|
2021-10-01 12:56:38 +02:00
|
|
|
- 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 }}"
|
|
|
|
|
2021-09-19 11:12:12 +02:00
|
|
|
- name: Set boolean value to exit playbook
|
|
|
|
set_fact:
|
|
|
|
end_playbook: true
|
|
|
|
|
|
|
|
- name: End playbook if this task list is called.
|
|
|
|
meta: end_play
|
|
|
|
when: end_playbook is defined and end_playbook|bool
|