summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Smoogen <smooge@redhat.com>2017-05-01 18:11:02 +0000
committerStephen Smoogen <smooge@redhat.com>2017-05-01 18:11:02 +0000
commite51982268b80ac30ad9d3f1c39d3768aaf7ade2f (patch)
tree8dee98506fc84490f69f845ae94a871a4fd8b035
parent7ae0b3abbaef68de2478532561c0a33497280d11 (diff)
downloadansible-e51982268b80ac30ad9d3f1c39d3768aaf7ade2f.tar.gz
ansible-e51982268b80ac30ad9d3f1c39d3768aaf7ade2f.tar.xz
ansible-e51982268b80ac30ad9d3f1c39d3768aaf7ade2f.zip
ok this should fix noc02
-rw-r--r--playbooks/groups/noc.yml2
-rw-r--r--roles/nagios_server/files/nrpe/nrpe.cfg2
-rw-r--r--roles/nagios_server/templates/nagios/hosts/phx2-hosts.cfg.j25
3 files changed, 6 insertions, 3 deletions
diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml
index 90acfa7e4..c5c153dc5 100644
--- a/playbooks/groups/noc.yml
+++ b/playbooks/groups/noc.yml
@@ -38,7 +38,7 @@
- include: "{{ handlers_path }}/restart_services.yml"
- name: deploy service-specific config (just for production)
- hosts: nagios-new
+ hosts: nagios
user: root
gather_facts: True
diff --git a/roles/nagios_server/files/nrpe/nrpe.cfg b/roles/nagios_server/files/nrpe/nrpe.cfg
index bf4e85488..fac5e37e5 100644
--- a/roles/nagios_server/files/nrpe/nrpe.cfg
+++ b/roles/nagios_server/files/nrpe/nrpe.cfg
@@ -32,7 +32,7 @@ debug=0
# number. The file is only written if the NRPE daemon is started by the root
# user and is running in standalone mode.
-pid_file=/var/run/nrpe/nrpe.pid
+#pid_file=/var/run/nrpe.pid
diff --git a/roles/nagios_server/templates/nagios/hosts/phx2-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/phx2-hosts.cfg.j2
index ddf9af969..7c5dbb3d3 100644
--- a/roles/nagios_server/templates/nagios/hosts/phx2-hosts.cfg.j2
+++ b/roles/nagios_server/templates/nagios/hosts/phx2-hosts.cfg.j2
@@ -85,7 +85,6 @@ define host {
define host {
host_name virthost20.phx2.fedoraproject.org
alias virthost20.phx2.fedoraproject.org
- use mincheck
check_command check-host-alive
address 10.5.126.160
parents phx2-gw
@@ -96,7 +95,11 @@ define host {
{% for host in groups['all'] %}
{% if hostvars[host].datacenter == 'phx2' %}
define host {
+{% if hostvars[host].nagios_services['nrpe'] == true %}
use defaulttemplate
+{% else %}
+ use mincheck
+{% endif %}
host_name {{ host }}
{% if hostvars[host].ansible_hostname is defined %}
alias {{ hostvars[host].ansible_hostname }}