diff --git a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 index 5674832615..47ecc04bdc 100644 --- a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 @@ -1,7 +1,6 @@ -{% for host in groups['all'] %} -{% if hostvars[host].datacenter == 'cloud' %} +{% for host in groups['cloud'] %} define host { -{% if hostvars[host].nagios_Check_Services['nrpe'] == true %} +{% if hostvars[host].nagios_Check_Services['nrpe'] == true and nagios_location == 'internal' %} use defaulttemplate {% else %} use mincheck