Try to exclude rdu3 hosts from the iad2 nagios template

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard
2025-06-23 09:12:25 +02:00
parent 8a4ee21d6a
commit b8fea68959

View File

@@ -7,7 +7,7 @@
define hostgroup{
hostgroup_name {{ key }}
alias {{ key }}
{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true %}
{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true and hostvars[host].datacenter == 'iad2' %}
{% if loop.first +%}
members {{ host }}{% else %}, {{ host }}{% endif %}
{% endfor +%}