This commit is contained in:
2025-11-23 17:04:15 +01:00
parent 60c1ca65d6
commit b3d616c5d2
+6 -7
View File
@@ -12,7 +12,7 @@
{% if ansible_facts['os_family'] == 'Debian' %} {% if ansible_facts['os_family'] == 'Debian' %}
nagios-nrpe-server nagios-nrpe-server
{% elif ansible_facts['os_family'] == 'RedHat' %} {% elif ansible_facts['os_family'] == 'RedHat' %}
nagios-plugins-nrpe.x86_64 nagios-plugins-nrpe.x86_64
{% else %} {% else %}
nrpe nrpe
{% endif %} {% endif %}
@@ -22,7 +22,7 @@
set_fact: set_fact:
nrpe_location: > nrpe_location: >
{% if ansible_facts['os_family'] == 'Debian' %} {% if ansible_facts['os_family'] == 'Debian' %}
"/usr/lib/nagios/plugins" /usr/lib/nagios/plugins/
{% elif ansible_facts['os_family'] == 'RedHat' %} {% elif ansible_facts['os_family'] == 'RedHat' %}
/usr/local/nagios/libexec /usr/local/nagios/libexec
{% else %} {% else %}
@@ -115,10 +115,9 @@
- name: Deploy custom Nagios/NRPE script - name: Deploy custom Nagios/NRPE script
ansible.builtin.copy: ansible.builtin.copy:
src: files/memory_usage.py src: files/memory_usage.py
dest: "{{ nrpe_location }}" dest: "{{ nrpe_location }}"
mode: '0755' mode: '0755'
become: true become: true
when: when:
- nrpe_installed is defined - nrpe_installed is defined
- psutil_installed is defined - psutil_installed is defined