From 9450bfe6b1f11e3ece084f09870e67668f284433 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 18 Jul 2017 14:39:57 +0200 Subject: [PATCH] library/roles/smartgears/resource_checker_se_plugin/tasks/main.yml: Do not install the nagios check if nagios is not enabled on the machine. --- smartgears/resource_checker_se_plugin/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) 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