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: Ifddc385fc292ddb7d6c2758b199401c45de0f0f2 Signed-off-by: Major Hayden <major@mhtx.net>
This commit is contained in:
parent
d0f837a049
commit
fcad8c23f5
@ -111,8 +111,7 @@
|
||||
check_mode: no
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_selinux.status is defined
|
||||
- ansible_selinux.status != 'disabled'
|
||||
- ansible_selinux.status == 'enabled'
|
||||
tags:
|
||||
- lsm
|
||||
- medium
|
||||
|
Loading…
Reference in New Issue
Block a user