mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00: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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user