diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 index 260e47b62f..71c286f20d 100644 --- a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 @@ -1,11 +1,10 @@ ## This template currently only works for noc02. If noc01 gets ipv6 then ## it will need to be revisited. -{% for host in groups['all']|sort %} {% -if hostvars[host].datacenter == 'ibiblio' and -hostvars[host].nagios_Can_Connect == true %} define host { use mincheck -{% endif %} - +{% for host in groups['all']|sort %} +{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %} +define host { + use mincheck host_name {{ host }}-ipv6 {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }}