vn-ansible/linux-config-nagios-nrpe.yaml

26 lines
836 B
YAML
Raw Normal View History

2023-10-17 13:10:41 +00:00
---
2023-12-19 14:55:30 +00:00
- hosts: '{{ ip_addr }}'
2023-10-17 13:10:41 +00:00
become: yes
become_method: sudo
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
2023-10-18 10:26:07 +00:00
- name: "[CONFIG NAGIOS NRPE] Install and configure nagios nrpe service"
2023-10-17 13:10:41 +00:00
import_role:
2024-02-15 17:03:48 +00:00
name: config-nagios-nrpe
when: nagios_nrpe_enabled | bool