debug the app dir

This commit is contained in:
2025-11-21 16:56:25 +01:00
parent 014807ab00
commit 0c9f9eabd2
2 changed files with 17 additions and 3 deletions
+13 -3
View File
@@ -2,7 +2,7 @@
package_facts:
manager: auto
# nagios-plugins-nrpe.x86_64 , nrpe, nagios-nrpe-plugin
# , nrpe, nagios-nrpe-plugin
- name: Check OS
debug:
msg: "{{ ansible_facts['os_family'] }} is the OS"
@@ -15,11 +15,21 @@
- name: Ensure NRPE is installed (Debian/Ubuntu)
apt:
name: nrpe
name: nagios-nrpe-plugin
state: present
become: yes
register: nrpe_install_result
when: "'nrpe' not in ansible_facts.packages"
when: "{{ ansible_facts['os_family'] == 'Debian' }} and ('nagios-nrpe-plugin' not in ansible_facts.packages) "
- name: Ensure NRPE is installed (RedHat/CentOS)
yum:
name: nagios-plugins-nrpe.x86_64
state: present
become: yes
register: nrpe_install_result
when: "{{ ansible_facts['os_family'] == 'RedHat' }} and ('nagios-plugins-nrpe.x86_64 ' not in ansible_facts.packages) "
- name: Deploy custom Nagios/NRPE script