From f6c99a69db244031cde43c7c37f11fb0cf651424 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 19 Jul 2013 00:55:41 -0400 Subject: [PATCH] switched from sestatus to selinuxenabled as per recommendation Signed-off-by: Brian Coca --- lib/ansible/module_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index 15de57c7542..df91d753507 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -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: