From 2e548a91e612c80fc87d1d97f956a30d40b6c0a7 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 9 Feb 2022 16:03:01 -0800 Subject: [PATCH] nagios_server: update what variable nagios templates use for ipv4 We changed eth0_ip and eth0_ipv4 to eth0_ipv4_ip. Update the host templates. Signed-off-by: Kevin Fenzi --- .../nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 | 4 ++-- .../templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 | 4 ++-- .../templates/nagios/hosts/host1plus-hosts.cfg.j2 | 4 ++-- roles/nagios_server/templates/nagios/hosts/iad2-hosts.cfg.j2 | 4 ++-- .../nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 | 4 ++-- .../templates/nagios/hosts/internetx-hosts.cfg.j2 | 4 ++-- .../nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 | 4 ++-- .../nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 | 4 ++-- .../nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 index 631200cd5c..8d719865cb 100644 --- a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 index bebe68e58c..dfe0ff757f 100644 --- a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 index cdbf7a268b..a9aa14b10b 100644 --- a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/iad2-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/iad2-hosts.cfg.j2 index 9985dac9cb..83374a936f 100644 --- a/roles/nagios_server/templates/nagios/hosts/iad2-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/iad2-hosts.cfg.j2 @@ -12,8 +12,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 index c503ed4ccf..8c4fde53c3 100644 --- a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 index c65e82cf35..cf3d407c46 100644 --- a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 index cfe6de2624..64be9ec2c9 100644 --- a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 index 32a0bc97a3..ef8c49975e 100644 --- a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 @@ -13,8 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }} diff --git a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 index 07eae9dc7a..8857d45a46 100644 --- a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 @@ -12,8 +12,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% if hostvars[host].eth0_ip is defined %} - address {{ hostvars[host].eth0_ip }} +{% if hostvars[host].eth0_ipv4_ip is defined %} + address {{ hostvars[host].eth0_ipv4_ip }} {% elif hostvars[host].ansible_default_ipv4 is defined %} {% if hostvars[host].ansible_default_ipv4.address is defined %} address {{ hostvars[host].ansible_default_ipv4.address }}