library/roles/smartgears/resource_checker_se_plugin/tasks/main.yml: Do not install the nagios check if nagios is not enabled on the machine.

This commit is contained in:
Andrea Dell'Amico 2017-07-18 14:39:57 +02:00
parent 30a6cc508b
commit 9450bfe6b1
1 changed files with 2 additions and 0 deletions

View File

@ -16,9 +16,11 @@
- block:
- name: Install the resource checker nagios check
template: src=check_missing_resources.sh.j2 dest={{ nagios_plugdir | default('/usr/lib/nagios/plugins') }}/check_missing_resources mode=0755
when: nagios_enabled is defined and nagios_enabled
- name: Install the nrpe job to run the check
template: src=resource_checker_nrpe.cfg.j2 dest=/etc/nagios/nrpe.d/resource_checker_nrpe.cfg owner=root group=root mode=0444
when: nagios_enabled is defined and nagios_enabled
notify: Reload NRPE server
become: False