nagios-nrpe: allowed_hosts can be updated
This commit is contained in:
parent
19b2da5b92
commit
6ed1f04c85
|
@ -12,6 +12,7 @@ The **patch** part changes incrmentally at each release.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
* mongodb: install python-pymongo for monitoring
|
* mongodb: install python-pymongo for monitoring
|
||||||
|
* nagios-nrpe: allowed_hosts can be updated
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Changelog: explain the versioning scheme
|
* Changelog: explain the versioning scheme
|
||||||
|
|
|
@ -7,6 +7,8 @@ nagios_nrpe_ldap_passwd: LDAP_PASSWD
|
||||||
nagios_nrpe_pgsql_passwd: PGSQL_PASSWD
|
nagios_nrpe_pgsql_passwd: PGSQL_PASSWD
|
||||||
nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}"
|
nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}"
|
||||||
|
|
||||||
|
nagios_nrpe_force_update_allowed_hosts: False
|
||||||
|
|
||||||
nagios_nrpe_check_proxy_host: "www.example.com"
|
nagios_nrpe_check_proxy_host: "www.example.com"
|
||||||
|
|
||||||
nagios_plugins_directory: "/usr/local/lib/nagios/plugins"
|
nagios_plugins_directory: "/usr/local/lib/nagios/plugins"
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
- nagios-plugins-common
|
- nagios-plugins-common
|
||||||
- nagios-plugins-contrib
|
- nagios-plugins-contrib
|
||||||
- nagios-plugins-standard
|
- nagios-plugins-standard
|
||||||
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
|
|
||||||
- name: custom configuration is present
|
- name: custom configuration is present
|
||||||
template:
|
template:
|
||||||
|
@ -19,6 +21,19 @@
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
force: no
|
force: no
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
|
|
||||||
|
- name: update allowed_hosts lists
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/nagios/nrpe.d/evolix.cfg
|
||||||
|
line: "allowed_hosts={{ nagios_nrpe_allowed_hosts | join(',') }}"
|
||||||
|
regexp: '^allowed_hosts='
|
||||||
|
insertafter: '# Allowed IPs'
|
||||||
|
notify: restart nagios-nrpe-server
|
||||||
|
when: nagios_nrpe_force_update_allowed_hosts
|
||||||
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
|
|
||||||
- name: Nagios config is secured
|
- name: Nagios config is secured
|
||||||
file:
|
file:
|
||||||
|
@ -27,12 +42,15 @@
|
||||||
group: nagios
|
group: nagios
|
||||||
state: directory
|
state: directory
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
|
|
||||||
- include_role:
|
- include_role:
|
||||||
name: remount-usr
|
name: remount-usr
|
||||||
when: nagios_plugins_directory | search ("/usr")
|
when: nagios_plugins_directory | search ("/usr")
|
||||||
tags:
|
tags:
|
||||||
- nagios-plugins
|
- nagios-nrpe
|
||||||
|
- nagios-plugins
|
||||||
|
|
||||||
- name: Nagios plugins are installed
|
- name: Nagios plugins are installed
|
||||||
copy:
|
copy:
|
||||||
|
@ -41,6 +59,7 @@
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
tags:
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
- nagios-plugins
|
- nagios-plugins
|
||||||
|
|
||||||
- name: Nagios lib is secured
|
- name: Nagios lib is secured
|
||||||
|
@ -51,3 +70,5 @@
|
||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
|
tags:
|
||||||
|
- nagios-nrpe
|
||||||
|
|
Loading…
Reference in a new issue