install package nrpe
This commit is contained in:
@@ -5,13 +5,15 @@
|
||||
- name: Check if nagios NRPE is installed
|
||||
debug:
|
||||
msg: "NRPE is installed."
|
||||
when: "'nagios-nrpe' in ansible_facts.packages"
|
||||
when: "'nrpe' in ansible_facts.packages"
|
||||
|
||||
- name: Ensure NRPE is installed (Debian/Ubuntu)
|
||||
apt:
|
||||
name: nrpe
|
||||
state: present
|
||||
become: yes
|
||||
register: nrpe_install_result
|
||||
when: "'nrpe' not in ansible_facts.packages"
|
||||
|
||||
|
||||
- name: Deploy custom Nagios/NRPE script
|
||||
@@ -19,3 +21,4 @@
|
||||
src: memory_usage_check.py
|
||||
dest: /usr/local/nagios/libexec/my_custom_check.py
|
||||
mode: '0755'
|
||||
when: nrpe_install_result is defined and nrpe_install_result.changed
|
||||
Reference in New Issue
Block a user