mirror of
				https://github.com/spantaleev/matrix-docker-ansible-deploy.git
				synced 2025-10-31 07:17:57 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			767 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			767 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| 
 | |
| - name: Set the new authorized key taken from file
 | |
|   authorized_key:
 | |
|     user: root
 | |
|     state: present
 | |
|     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
 | |
| 
 | |
| - name: End playbook if this task list is called.
 | |
|   meta: end_play
 | |
|   when: end_playbook is defined and end_playbook|bool
 |