diff --git a/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml b/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml index bb71812b93e8b53546c8337bbb5cd0ed6be38b60..dbe13bece53e07d06c59af01fb9116f3eb556446 100644 --- a/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml +++ b/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml @@ -14,5 +14,5 @@ - name: Show diff of "{{ config_object }}" ansible.builtin.debug: msg: "{{ response }}" - when: verb == "fix" and not (dry_run | ansible.builtin.bool) + when: verb == "fix" and not (dry_run | ansible.builtin.bool) diff --git a/geant/ops_ansible/roles/cic_generic/tasks/main.yml b/geant/ops_ansible/roles/cic_generic/tasks/main.yml index e2c27467ba38f79264f99ff8403a774327424144..746776e9591aaeb74698e3b9200e78ed7670455f 100644 --- a/geant/ops_ansible/roles/cic_generic/tasks/main.yml +++ b/geant/ops_ansible/roles/cic_generic/tasks/main.yml @@ -56,4 +56,3 @@ - name: Include the test tasks if specified include_tasks: fix_template.yaml when: verb == "fix" - diff --git a/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml b/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml index 0db0e769668250d8238472731d47fe3fd5eed4bf..51173d88bf5ca4284933261f42b58a8e5c1fab5a 100644 --- a/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml +++ b/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml @@ -11,7 +11,7 @@ register: response when: verb == "test" and dry_run | ansible.builtin.bool -### This task never fails. It only shows differences if ther are any +### This task never fails. It only shows differences if ther are any ### but commit-check in the previous task should succeed - name: Show DRY diff of "{{ config_object }}" ansible.builtin.debug: @@ -22,7 +22,7 @@ # - name: Fail if there are diffs # ansible.builtin.fail: # msg: "Running configuration is not the same as the intended" -# when: response.changed == true +# when: response.changed == true - name: Send an e-mail using Geant SMTP servers mail: @@ -30,7 +30,7 @@ port: "{{ cic_alerts_smtp_port }}" sender: "{{ cic_alerts_sender }}" to: "{{ cic_alerts_recipient }}" - subject: "Config Integrity Check failed for {{ inventory_hostname }} on {{ config_object }}" + subject: "Config Integrity Check failed for {{ inventory_hostname }} on {{ config_object }}" body: "{{ lookup('ansible.builtin.template', 'mail_body.j2') }}" delegate_to: localhost when: response.changed == true and (send_email | ansible.builtin.bool) == true