From b6a7d5edfd27bfe2379f0f5d1be30d64f4b18c8a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 16 Feb 2026 10:23:01 -0800 Subject: [PATCH] nagios: try and rework conditional Signed-off-by: Kevin Fenzi --- roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 index 129dcf467c..ed724c7a80 100644 --- a/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 @@ -1,5 +1,5 @@ {% for host in groups['all']|sort %} -{% if hostvars[host].datacenter == 'rdu3' or if hostvars[host].datacenter == 'rdu3-iso' and hostvars[host].nagios_Can_Connect == true %} +{% if hostvars[host].datacenter.startswith('rdu3') and hostvars[host].nagios_Can_Connect == true %} define host { {% if hostvars[host].nagios_Check_Services['nrpe'] == true %} use defaulttemplate