switched from sestatus to selinuxenabled as per recommendation
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
98cc29f9fd
commit
f6c99a69db
1 changed files with 4 additions and 4 deletions
|
@ -265,10 +265,10 @@ class AnsibleModule(object):
|
|||
|
||||
def selinux_enabled(self):
|
||||
if not HAVE_SELINUX:
|
||||
sestatus = get_bin_path('sestatus')
|
||||
if sestatus is not None:
|
||||
(rc,out,err) = run_command(sestatus)
|
||||
if rc == 0 and re.search('enabled', out):
|
||||
seenabled = get_bin_path('selinuxenabled')
|
||||
if seenabled is not None:
|
||||
(rc,out,err) = run_command(seenabled)
|
||||
if rc == 0:
|
||||
self.fail_json(msg="Aborting, target uses selinux but python bindings (python-selinux) aren't installed!")
|
||||
return False
|
||||
if selinux.is_selinux_enabled() == 1:
|
||||
|
|
Loading…
Reference in a new issue