when clauses in all package installers
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
register: nrpe_install_result
|
register: nrpe_install_result
|
||||||
when: "{{ ansible_facts['os_family'] }} == 'Debian' "
|
when: "{{ ansible_facts['os_family'] == 'Debian' and not nrpe_installed }}"
|
||||||
|
|
||||||
- name: Ensure NRPE is installed (RedHat/CentOS)
|
- name: Ensure NRPE is installed (RedHat/CentOS)
|
||||||
yum:
|
yum:
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
register: nrpe_install_result
|
register: nrpe_install_result
|
||||||
when: "{{ ansible_facts['os_family'] }} == 'RedHat' "
|
when: "{{ ansible_facts['os_family'] == 'RedHat' and not nrpe_installed }}"
|
||||||
|
|
||||||
- name: Ensure NRPE is installed (FreeBSD)
|
- name: Ensure NRPE is installed (FreeBSD)
|
||||||
ansible.builtin.pkgng:
|
ansible.builtin.pkgng:
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
register: nrpe_install_result
|
register: nrpe_install_result
|
||||||
when:
|
when:
|
||||||
- ansible_facts['os_family'] == 'FreeBSD'
|
- ansible_facts['os_family'] == 'FreeBSD'
|
||||||
|
- not nrpe_installed
|
||||||
|
|
||||||
|
|
||||||
- name: Set psutil_installed fact if any package name contains "psutil"
|
- name: Set psutil_installed fact if any package name contains "psutil"
|
||||||
|
|||||||
Reference in New Issue
Block a user