]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Create nagios_allowed_hosts var for lab-specific nagios IPs
authorDavid Galloway <dgallowa@redhat.com>
Thu, 22 Sep 2016 21:30:29 +0000 (17:30 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 23 Sep 2016 20:12:36 +0000 (16:12 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/README.rst
roles/common/defaults/main.yml
roles/common/templates/nagios/nrpe.cfg

index c030603e2b024d25902a2182b83c6cde5f0ab24e..956ffed8e36faa7a975d8af1396f4970cc81f9a4 100644 (file)
@@ -45,6 +45,8 @@ Defined in ``roles/common/defaults/main.yml``.
 ``yum_timeout`` is an integer used to set the yum timeout.  Defined in
 ``roles/common/defaults/main.yml``.
 
+``nagios_allowed_hosts`` should be a comma-separated list of hosts allowed to query NRPE.  Override in the secrets repo.
+
 The following variables are used to configure NRPE_ (Nagios Remote Plugin
 Executor) on hosts in ``/etc/nagios/nrpe.cfg``.  The system defaults differ between distros (``nrpe`` in
 RHEL vs ``nagios-nrpe-server`` in Ubuntu).  Setting these allows us to make
index ed370347521b4e2495cfbb90884fc45771442e2e..362297746a05104415b970f361c7ef8a91fb00fe 100644 (file)
@@ -37,3 +37,6 @@ beta_distro: false
 
 enable_epel: true
 yum_timeout: 300
+
+# Override in secrets repo
+nagios_allowed_hosts: "127.0.0.1"
index 84435c8992c80a6768231d36e6cf49ccab41a2c8..3aabc163e141868ff6932534b3a6f0276a3ae7e7 100644 (file)
@@ -5,10 +5,7 @@ server_port=5666
 nrpe_user={{ nrpe_user }}
 nrpe_group={{ nrpe_group }}
 
-# These should eventually be in a secrets group_var
-# 172. address is sepia nagios server
-# 10. address is octo nagios server
-allowed_hosts=127.0.0.1,172.21.0.33,10.8.0.8
+allowed_hosts={{ nagios_allowed_hosts }}
 dont_blame_nrpe=0
 debug=0
 command_timeout=60