From 9e030aad627d02ac34225c61daa35b0a2a88d549 Mon Sep 17 00:00:00 2001
From: "ak@geant.org" <ak@geant.org>
Date: Mon, 16 Oct 2023 15:00:13 +0100
Subject: [PATCH] Fixes: bools checks and FQCNs

---
 geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml  | 1 -
 geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

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 dbe13be..bcaf501 100644
--- a/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml
+++ b/geant/ops_ansible/roles/cic_generic/tasks/fix_template.yaml
@@ -15,4 +15,3 @@
   ansible.builtin.debug:
     msg: "{{ response }}"
   when: verb == "fix" and not (dry_run | ansible.builtin.bool)
-
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 51173d8..9fd4d68 100644
--- a/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml
+++ b/geant/ops_ansible/roles/cic_generic/tasks/test_template.yaml
@@ -25,7 +25,7 @@
 #   when: response.changed == true
 
 - name: Send an e-mail using Geant SMTP servers
-  mail:
+  community.general.mail:
     host: "{{ cic_alerts_mail_host }}"
     port: "{{ cic_alerts_smtp_port }}"
     sender: "{{ cic_alerts_sender }}"
@@ -33,4 +33,4 @@
     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
+  when: (response.changed | ansible.builtin.bool) and (send_email | ansible.builtin.bool)
-- 
GitLab