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 2afcf5c70e..1038224c84 100644 --- a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 @@ -1,8 +1,8 @@ {% for host in groups['cloud']|sort %} -{% if host.startswith('copr') and nagios_location == 'external' %} +{% if host.startswith('copr') and vars['nagios_location'] == 'external' %} {% else %} define host { -{% if hostvars[host]['nagios_Check_Services']['nrpe'] and nagios_location == 'internal' %} +{% if hostvars[host].nagios_Check_Services['nrpe'] and vars['nagios_location'] == 'internal' %} use defaulttemplate {% else %} use mincheck