summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library/openshift_facts.py
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-05-03 12:12:46 -0500
committerGitHub <noreply@github.com>2017-05-03 12:12:46 -0500
commit13f91534f8e8539bfe31e50a38f5b69cbc124ed9 (patch)
tree75fa8a949be38bda3cbd79e7c8f445e5d01087f2 /roles/openshift_facts/library/openshift_facts.py
parent1163633a1de10133f0fca505e88f4d4610314882 (diff)
parent828ccd86df772bc5dbf5617dd257740338e81e30 (diff)
downloadopenshift-13f91534f8e8539bfe31e50a38f5b69cbc124ed9.tar.gz
openshift-13f91534f8e8539bfe31e50a38f5b69cbc124ed9.tar.bz2
openshift-13f91534f8e8539bfe31e50a38f5b69cbc124ed9.tar.xz
openshift-13f91534f8e8539bfe31e50a38f5b69cbc124ed9.zip
Merge pull request #4062 from abutcher/atomicf25
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_facts/library/openshift_facts.py')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index ca0279426..ec4014e60 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1911,14 +1911,16 @@ class OpenShiftFacts(object):
)
self.role = role
+ # Collect system facts and preface each fact with 'ansible_'.
try:
- # ansible-2.1
# pylint: disable=too-many-function-args,invalid-name
self.system_facts = ansible_facts(module, ['hardware', 'network', 'virtual', 'facter']) # noqa: F405
+ additional_facts = {}
for (k, v) in self.system_facts.items():
- self.system_facts["ansible_%s" % k.replace('-', '_')] = v
+ additional_facts["ansible_%s" % k.replace('-', '_')] = v
+ self.system_facts.update(additional_facts)
except UnboundLocalError:
- # ansible-2.2
+ # ansible-2.2,2.3
self.system_facts = get_all_facts(module)['ansible_facts'] # noqa: F405
self.facts = self.generate_facts(local_facts,