summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Fenzi <kevin@scrye.com>2017-05-01 22:34:46 +0000
committerKevin Fenzi <kevin@scrye.com>2017-05-01 22:34:46 +0000
commit32dc682b1fec2f69ff8420a82d83f6f27f968255 (patch)
tree3faf64d488329be4f7e60df592b6d2ba205758b8
parent39d45bab43583b023fe7cbc9e159e56549df4619 (diff)
downloadansible-32dc682b1fec2f69ff8420a82d83f6f27f968255.tar.gz
ansible-32dc682b1fec2f69ff8420a82d83f6f27f968255.tar.xz
ansible-32dc682b1fec2f69ff8420a82d83f6f27f968255.zip
fix staging hosts nrpe checking for staging builders
-rw-r--r--roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j24
1 files changed, 4 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 256809c85..168c3d476 100644
--- a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2
+++ b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2
@@ -1,7 +1,11 @@
{% for host in groups['all'] %}
{% if hostvars[host].datacenter == 'staging' %}
define host {
+{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
use defaulttemplate
+{% else %}
+ use mincheck
+{% endif %}
host_name {{ host }}
{% if hostvars[host].ansible_hostname is defined %}
alias {{ hostvars[host].ansible_hostname }}