Simplify SELinux check

The ansible_selinux variable is always populated with a 'status'
property, even if SELinux is not installed or configured. This
patch simplifies the check.

Change-Id: I4b5930faf2bdc5f7d1b346df875715c7e304d99e
Signed-off-by: Major Hayden <major@mhtx.net>
This commit is contained in:
Major Hayden 2018-03-06 13:15:00 -06:00
parent 1bd0b32519
commit d7bd5ef68f
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 0 additions and 2 deletions

View File

@ -38,6 +38,4 @@
notify:
- Restart haproxy
when:
- ansible_pkg_mgr == 'yum'
- ansible_selinux.status is defined
- ansible_selinux.status == "enabled"