From 33824fb2ccc648b292b053bf6a75ad565d27884f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 20 Jul 2017 00:15:06 +0000 Subject: [PATCH] try this --- roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8ea2d502a5..cd13e6ed62 100644 --- a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 @@ -16,7 +16,7 @@ define host { {% if hostvars[host].eth0_ip is defined %} address {{ hostvars[host].eth0_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} -{% if hostvars[host].ansible_default_ipv4.address is defined and not in groups['cloud'] %} +{% if hostvars[host].ansible_default_ipv4.address is defined and host not in groups['cloud'] %} address {{ hostvars[host].ansible_default_ipv4.address }} {% endif %} {% else %}