1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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):
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: