From 85c7a7b844bf429fc9cc0ffce5dd9bf05ed47b5a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 24 May 2017 14:25:23 -0400 Subject: [PATCH] added new selinux fact to clarify python lib the selinux fact is boolean false when the library is not installed, a dictionary/hash otherwise, but this is ambigous added new fact so we can eventually remove the type dichtomy and normalize it as a dict --- lib/ansible/module_utils/facts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 08d41813608..4d0de4f9c71 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -443,8 +443,10 @@ class Facts(object): def get_selinux_facts(self): if not HAVE_SELINUX: self.facts['selinux'] = False + self.facts['selinux_python_present'] = False return self.facts['selinux'] = {} + self.facts['selinux_python_present'] = True if not selinux.is_selinux_enabled(): self.facts['selinux']['status'] = 'disabled' else: