From: David Galloway Date: Mon, 27 Mar 2017 21:38:24 +0000 (-0400) Subject: common: Workaround for new ansible conditional evaluation bug X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=763b91aa66e9bded987e57232e09a780513576ad;p=ceph-cm-ansible.git common: Workaround for new ansible conditional evaluation bug Prior to ansible v2.2.2.0, if the first conditional was false, the second conditional wasn't checked. This change makes sure nrpe-selinux.yml is only included on RHEL/CentOS which are the only OSes that will have stdout for the selinux_status var. Signed-off-by: David Galloway --- diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index f4af1d3..10d5483 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -51,6 +51,7 @@ # configure selinux for nagios - include: nrpe-selinux.yml - when: selinux_status is defined and selinux_status.stdout != "Disabled" + when: ansible_os_family == "RedHat" and + (selinux_status is defined and selinux_status.stdout != "Disabled") tags: - nagios