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
This commit is contained in:
Brian Coca 2017-05-24 14:25:23 -04:00 committed by Brian Coca
parent 211d0656f8
commit 85c7a7b844

View file

@ -443,8 +443,10 @@ class Facts(object):
def get_selinux_facts(self): def get_selinux_facts(self):
if not HAVE_SELINUX: if not HAVE_SELINUX:
self.facts['selinux'] = False self.facts['selinux'] = False
self.facts['selinux_python_present'] = False
return return
self.facts['selinux'] = {} self.facts['selinux'] = {}
self.facts['selinux_python_present'] = True
if not selinux.is_selinux_enabled(): if not selinux.is_selinux_enabled():
self.facts['selinux']['status'] = 'disabled' self.facts['selinux']['status'] = 'disabled'
else: else: