From dd1a69436819a7e073cc952e547c32c34e5dcc57 Mon Sep 17 00:00:00 2001 From: Danny de Kooker Date: Sat, 8 Jun 2024 14:44:51 +0200 Subject: [PATCH] optimize notification --- Maintenance/maint-reboot-required.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/maint-reboot-required.yaml b/Maintenance/maint-reboot-required.yaml index 417b538..9af32c8 100644 --- a/Maintenance/maint-reboot-required.yaml +++ b/Maintenance/maint-reboot-required.yaml @@ -36,7 +36,7 @@ {% for host in ansible_play_hosts_all %} { "name": "{{ host }}", - "value": "{% if host in reboot_results | select('stat.exists') | map('ansible_host') %}&#U+2705 Rebooted{% else %}Not Rebooted{% endif %}" + "value": "{% if hostvars[host]['reboot']['stat']['exists'] %}&#U+2705 Rebooted{% else %}Not Rebooted{% endif %}" }{% if not loop.last %},{% endif %} {% endfor %} ]