when clause as bullit list

This commit is contained in:
2025-11-22 20:42:12 +01:00
parent 7bba240f6e
commit 5db4f47375
+6 -2
View File
@@ -35,7 +35,9 @@
state: present state: present
become: true become: true
register: nrpe_install_result register: nrpe_install_result
when: "{{ ansible_facts['os_family'] == 'Debian' and not nrpe_installed }}" 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 +45,9 @@
state: present state: present
become: yes become: yes
register: nrpe_install_result register: nrpe_install_result
when: "{{ ansible_facts['os_family'] == 'RedHat' and not nrpe_installed }}" when:
- ansible_facts['os_family'] == 'RedHat'
- not nrpe_installed
- name: Ensure NRPE is installed (FreeBSD) - name: Ensure NRPE is installed (FreeBSD)
ansible.builtin.pkgng: ansible.builtin.pkgng: