diff --git a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 index 8857d45a46..6fa730de68 100644 --- a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 @@ -1,4 +1,4 @@ -{% for host in groups['all']|sort %} +{% for host in groups['all']|sort if hostvars[host].datacenter == datacenter %} {% if hostvars[host].datacenter == 'staging' and hostvars[host].nagios_Can_Connect == true %} define host { {% if hostvars[host].nagios_Check_Services['nrpe'] == true %}