Force replacement of some NRPE checks
We cannot simply put "force: true" because some checks are customizable, some are not. We do not force to replace customizable ones for the customizations not to be lost.
This commit is contained in:
parent
30c1b70e2b
commit
5c11472e9a
|
@ -32,23 +32,33 @@
|
||||||
|
|
||||||
- name: Nagios plugins are installed
|
- name: Nagios plugins are installed
|
||||||
copy:
|
copy:
|
||||||
src: plugins_bsd/
|
src: plugins_bsd/{{ item.name }}
|
||||||
dest: /usr/local/libexec/nagios/plugins/
|
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
force: "{{ item.force }}"
|
||||||
|
with_items:
|
||||||
|
- { name: 'check_carp_if', force: true }
|
||||||
|
- { name: 'check_connections_state.sh', force: false }
|
||||||
|
- { name: 'check_ipsecctl.sh', force: false }
|
||||||
|
- { name: 'check_openbgpd', force: true }
|
||||||
|
- { name: 'check_openvpn', force: false }
|
||||||
|
- { name: 'check_openvpn.pl', force: true }
|
||||||
|
- { name: 'check_ospfd_simple', force: true }
|
||||||
notify: restart nrpe
|
notify: restart nrpe
|
||||||
|
|
||||||
- name: Nagios plugins are installed - template
|
- name: Nagios plugins are installed - template
|
||||||
template:
|
template:
|
||||||
src: plugins_bsd/{{ item }}.j2
|
src: plugins_bsd/{{ item.name }}.j2
|
||||||
dest: /usr/local/libexec/nagios/plugins/{{ item }}
|
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
||||||
owner: root
|
owner: root
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
force: "{{ item.force }}"
|
||||||
with_items:
|
with_items:
|
||||||
- 'check_pf_states'
|
- { name: 'check_pf_states', force: false }
|
||||||
- 'check_free_mem.sh'
|
- { name: 'check_free_mem.sh', force: true }
|
||||||
notify: restart nrpe
|
notify: restart nrpe
|
||||||
|
|
||||||
- name: Starting and enabling nrpe
|
- name: Starting and enabling nrpe
|
||||||
|
|
Loading…
Reference in a new issue