diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2017-05-24 14:25:23 -0400 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2017-05-25 10:37:52 -0400 |
commit | 85c7a7b844bf429fc9cc0ffce5dd9bf05ed47b5a (patch) | |
tree | 31df22ed027aba2e37fdf71f0b6f998cde025ebe | |
parent | 211d0656f8c3982e0a35f0bda1e67a31c8ad5672 (diff) | |
download | ansible-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.py | 2 |
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: |