From a37e5b6d60e6ff9387ea9d73020eb16e7ef66ead Mon Sep 17 00:00:00 2001 From: Michael Collins Date: Fri, 20 Aug 2021 09:58:55 +0800 Subject: [PATCH] job templates cant delete themselves --- .../matrix-awx/tasks/delete_awx_templates.yml | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/roles/matrix-awx/tasks/delete_awx_templates.yml b/roles/matrix-awx/tasks/delete_awx_templates.yml index faa28921c..79a19628f 100755 --- a/roles/matrix-awx/tasks/delete_awx_templates.yml +++ b/roles/matrix-awx/tasks/delete_awx_templates.yml @@ -294,18 +294,6 @@ validate_certs: yes when: matrix_domain is defined -- name: Remove '<< SUBSCRIPTION DELETION IN PROGRESS >>' job template - delegate_to: 127.0.0.1 - awx.awx.tower_job_template: - name: "0 - {{ subscription_id }} - << SUBSCRIPTION DELETION IN PROGRESS >>" - 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 - - name: Remove Matrix server from organisations inventory delegate_to: 127.0.0.1 awx.awx.tower_host: @@ -330,6 +318,22 @@ validate_certs: yes when: matrix_domain is defined +#- name: Remove '<< SUBSCRIPTION DELETION IN PROGRESS >>' job template +# delegate_to: 127.0.0.1 +# awx.awx.tower_job_template: +# name: "0 - {{ subscription_id }} - << SUBSCRIPTION DELETION IN PROGRESS >>" +# 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 + +# make new extra vars file +# remake 'delete delete playbook' +# launch it + - name: Set boolean value to exit playbook set_fact: end_playbook: true