debug the app dir
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
path: /opt/ansible_workdir
|
||||
register: app_dir
|
||||
|
||||
-name: Debug app_dir result
|
||||
debug:
|
||||
msg: "{{ app_dir }} is the place to be"
|
||||
|
||||
- name: Debug app_dir result
|
||||
debug:
|
||||
var: app_dir.stat.exists
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user