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