summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-05-24 14:25:23 -0400
committerBrian Coca <bcoca@users.noreply.github.com>2017-05-25 10:37:52 -0400
commit85c7a7b844bf429fc9cc0ffce5dd9bf05ed47b5a (patch)
tree31df22ed027aba2e37fdf71f0b6f998cde025ebe
parent211d0656f8c3982e0a35f0bda1e67a31c8ad5672 (diff)
downloadansible-85c7a7b844bf429fc9cc0ffce5dd9bf05ed47b5a.tar.gz
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
-rw-r--r--lib/ansible/module_utils/facts.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py
index 08d4181360..4d0de4f9c7 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: