diff --git a/smartgears/resource_checker_se_plugin/tasks/main.yml b/smartgears/resource_checker_se_plugin/tasks/main.yml index 629c87e..d3184b5 100644 --- a/smartgears/resource_checker_se_plugin/tasks/main.yml +++ b/smartgears/resource_checker_se_plugin/tasks/main.yml @@ -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