From ab87b7ceb5d1769dab15d8884d917d76fa4614ec Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Wed, 27 Jun 2018 22:40:02 +0000 Subject: [PATCH] Try vars['nagios_location'] instead of nagios_location Signed-off-by: Rick Elrod --- roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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