summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Smoogen <smooge@redhat.com>2017-02-20 19:23:19 +0000
committerStephen Smoogen <smooge@redhat.com>2017-02-20 19:23:19 +0000
commitefb85be09e7a42ff63ed07a6cbf75d515d228e48 (patch)
tree4f9212879f38fe70f51b254f671da2a396bf1999
parent9213be3ff9377fc1d8d81bec0c96af005afcfe22 (diff)
ok instead of throwing up our hands and screaming at the clouds.. put in a real fix.
-rw-r--r--roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j27
1 files changed, 7 insertions, 0 deletions
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 9f80b2fb2..256809c85 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 %}