From efb85be09e7a42ff63ed07a6cbf75d515d228e48 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Mon, 20 Feb 2017 19:23:19 +0000 Subject: [PATCH] ok instead of throwing up our hands and screaming at the clouds.. put in a real fix. --- .../templates/nagios/hosts/staging-hosts.cfg.j2 | 7 +++++++ 1 file changed, 7 insertions(+) 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 9f80b2fb25..256809c850 100644 --- a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 @@ -17,8 +17,15 @@ define host { {% else %} address {{ host }} {% endif %} +{% if env == 'staging' %} ## Some staging parents do not allow ssh from staging. Just default to gw parents phx2-gw +{% elif hostvars[host]['vmhost'] is defined %} + parents {{ hostvars[host]['vmhost'] }} +{% elif hostvars[host].datacenter is defined %} + parents phx2-gw +{% endif %} + } {% endif %} {% endfor %}