From 33ccc11860ca224c6565badb05a409e6d2b8c1e2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 26 Apr 2023 00:36:56 +0200 Subject: [PATCH] nagios: don't duplicate the host specifications Revert "nagios: fix the ibiblio-hosts-ipv6 ifdef" This reverts commit 4a999c925b53057bfa8a48542f4ca0ac23ba898a. --- .../templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 62ab73a546..fe7f81e96e 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 @@ -5,10 +5,11 @@ {% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %} define host { use mincheck6 - host_name {{ host }} + host_name {{ hostvars[host].ansible_hostname }}-ipv6.fedoraproject.org {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }}-ipv6 - alias {{ hostvars[host].ansible_hostname }}-ipv6.fedoraproject.org +{% else %} + alias {{ host }} {% endif %} {% if hostvars[host].eth0_ipv6_ip is defined %} address {{ hostvars[host].eth0_ipv6_ip }}