debug the app dir
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
path: /opt/ansible_workdir
|
path: /opt/ansible_workdir
|
||||||
register: app_dir
|
register: app_dir
|
||||||
|
|
||||||
|
-name: Debug app_dir result
|
||||||
|
debug:
|
||||||
|
msg: "{{ app_dir }} is the place to be"
|
||||||
|
|
||||||
- name: Debug app_dir result
|
- name: Debug app_dir result
|
||||||
debug:
|
debug:
|
||||||
var: app_dir.stat.exists
|
var: app_dir.stat.exists
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
package_facts:
|
package_facts:
|
||||||
manager: auto
|
manager: auto
|
||||||
|
|
||||||
# nagios-plugins-nrpe.x86_64 , nrpe, nagios-nrpe-plugin
|
# , nrpe, nagios-nrpe-plugin
|
||||||
- name: Check OS
|
- name: Check OS
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ ansible_facts['os_family'] }} is the OS"
|
msg: "{{ ansible_facts['os_family'] }} is the OS"
|
||||||
@@ -15,11 +15,21 @@
|
|||||||
|
|
||||||
- name: Ensure NRPE is installed (Debian/Ubuntu)
|
- name: Ensure NRPE is installed (Debian/Ubuntu)
|
||||||
apt:
|
apt:
|
||||||
name: nrpe
|
name: nagios-nrpe-plugin
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
register: nrpe_install_result
|
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
|
- name: Deploy custom Nagios/NRPE script
|
||||||
|
|||||||
Reference in New Issue
Block a user