From 0cbad706fbb59924261fb60a0bbb6d03248168c2 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Thu, 6 Feb 2020 19:13:03 +0000 Subject: [PATCH] try to get nagios to talk to it over the vpn Signed-off-by: Rick Elrod --- .../nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 index 9db8882cc6..84671335c8 100644 --- a/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 @@ -13,12 +13,8 @@ define host { {% else %} alias {{ host }} {% endif %} -{% 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 %} - address {{ hostvars[host].ansible_default_ipv4.address }} -{% endif %} +{% if hostvars[host].tun0_ip is defined %} + address {{ hostvars[host].tun0_ip }} {% else %} address {{ host }} {% endif %}