From 05e294deece02f19d928bd959fa9d779ade7594a Mon Sep 17 00:00:00 2001 From: David Lopez Date: Fri, 6 Sep 2024 20:14:28 +0000 Subject: [PATCH] Actualizar linux-config-nagios-nrpe.yaml --- linux-config-nagios-nrpe.yaml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/linux-config-nagios-nrpe.yaml b/linux-config-nagios-nrpe.yaml index 74fa915..ef52ee6 100644 --- a/linux-config-nagios-nrpe.yaml +++ b/linux-config-nagios-nrpe.yaml @@ -6,21 +6,12 @@ gather_facts: no tasks: - - name: "[DEBUG] Comprobando si es necesario configurar nagios nrpe service" - debug: - var: nagios_nrpe_enabled - - - name: "[CONFIG NAGIOS NRPE] Definir valor predeterminado para nagios_nrpe_enabled si no está definido" - set_fact: - nagios_nrpe_enabled: false - when: nagios_nrpe_enabled is not defined - - - 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 | bool == false - - - name: "[CONFIG NAGIOS NRPE] Install and configure nagios nrpe service" - import_role: - name: config-nagios-nrpe - when: nagios_nrpe_enabled | bool \ No newline at end of file + # Paso 1: Instalar paquetes necesarios para Nagios NRPE + - name: "[CONFIG NAGIOS NRPE] Instalar paquetes nagios-nrpe-server y nagios-nrpe-plugin" + apt: + name: "{{ item }}" + state: present + update_cache: yes + loop: + - nagios-nrpe-server + - nagios-nrpe-plugin \ No newline at end of file