]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Workaround for new ansible conditional evaluation bug 315/head
authorDavid Galloway <dgallowa@redhat.com>
Mon, 27 Mar 2017 21:38:24 +0000 (17:38 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Mon, 27 Mar 2017 22:04:10 +0000 (18:04 -0400)
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 <dgallowa@redhat.com>
roles/common/tasks/main.yml

index f4af1d3dd2c51c46a4c10b5f649b402eb688e540..10d5483a18c38cf4e292482a62dc5e1505eca9cf 100644 (file)
@@ -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