missing one template from deletion section

This commit is contained in:
Michael Collins 2021-08-24 18:35:00 +08:00
parent a49da05cf9
commit c6f8bc5d83
2 changed files with 16 additions and 3 deletions

View File

@ -293,3 +293,16 @@
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes
when: matrix_domain is defined when: matrix_domain is defined
- name: Remove 'Purge Database (Advanced)' job template
delegate_to: 127.0.0.1
awx.awx.tower_job_template:
name: "{{ matrix_domain }} - 2 - Purge Database (Advanced)"
job_type: run
project: "{{ member_id }} - Matrix Docker Ansible Deploy"
playbook: setup.yml
state: absent
tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes
when: matrix_domain is defined

View File

@ -8,8 +8,8 @@
- name: Save new 'Delete Job Template' survey.json to the AWX tower, template - name: Save new 'Delete Job Template' survey.json to the AWX tower, template
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
template: template:
src: '{{ role_path }}/templates/delete_job_template.json.j2' src: '{{ role_path }}/templates/cleanup_deletion_template.json.j2'
dest: '/var/lib/awx/projects/hosting/delete_job_template.json' dest: '/var/lib/awx/projects/hosting/cleanup_deletion_template.json'
- name: Re-create '00 - Cleanup Deletion Template' job template - name: Re-create '00 - Cleanup Deletion Template' job template
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
@ -20,7 +20,7 @@
inventory: "{{ org_name }} [Admin]" inventory: "{{ org_name }} [Admin]"
project: "Ansible Create Delete Subscription Membership" project: "Ansible Create Delete Subscription Membership"
playbook: cleanup_deletion_job_template.yml playbook: cleanup_deletion_job_template.yml
extra_vars: "{{ lookup('file', '/var/lib/awx/projects/hosting/delete_job_template.json') }}" extra_vars: "{{ lookup('file', '/var/lib/awx/projects/hosting/cleanup_deletion_template.json') }}"
ask_extra_vars: yes ask_extra_vars: yes
state: present state: present
verbosity: 1 verbosity: 1