From 3715668663af6a5ed252bc20799963715737b6c2 Mon Sep 17 00:00:00 2001 From: rubenb Date: Thu, 15 Feb 2024 17:23:12 +0100 Subject: [PATCH] add conditional --- linux-config-nagios-nrpe.yaml | 5 +++++ roles/config-nagios-nrpe/tasks/main.yaml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/linux-config-nagios-nrpe.yaml b/linux-config-nagios-nrpe.yaml index ec0387d..311d228 100644 --- a/linux-config-nagios-nrpe.yaml +++ b/linux-config-nagios-nrpe.yaml @@ -7,6 +7,11 @@ tasks: + - name: "[CONFIG NAGIOS NRPE] Comprobando si es necesario configurar nagios nrpe service " + debug: + msg: "No es necesario configurar nagios nrpe service en la máquina" + when: nagios-nrpe_enabled is not defined or not nagios-nrpe_enabled + - name: "[CONFIG NAGIOS NRPE] Install and configure nagios nrpe service" import_role: name: config-nagios-nrpe \ No newline at end of file diff --git a/roles/config-nagios-nrpe/tasks/main.yaml b/roles/config-nagios-nrpe/tasks/main.yaml index b77d4e3..0afc60d 100644 --- a/roles/config-nagios-nrpe/tasks/main.yaml +++ b/roles/config-nagios-nrpe/tasks/main.yaml @@ -2,6 +2,10 @@ # Install and configure NAGIOS-NRPE #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- name: "[CONFIG NAGIOS NRPE] Comprobando si es necesario configurar nagios nrpe service " + meta: end_host + when: nagios-nrpe_enabled is not defined or not nagios-nrpe_enabled + #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # paso1 # install packages for nagios-nrpe