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>
# 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