summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-06-07 13:56:30 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-06-07 15:21:31 -0400
commit5701ba78c681e6f9efd841e76382e3aeb9853c9b (patch)
tree4f9dd93b954ee719d3ab532f3548abc02d9291fd /roles/openshift_facts
parent377405b67551ef51ce6f644bde018986465a1e0c (diff)
downloadopenshift-5701ba78c681e6f9efd841e76382e3aeb9853c9b.tar.gz
openshift-5701ba78c681e6f9efd841e76382e3aeb9853c9b.tar.bz2
openshift-5701ba78c681e6f9efd841e76382e3aeb9853c9b.tar.xz
openshift-5701ba78c681e6f9efd841e76382e3aeb9853c9b.zip
Ansible 2.1 support.
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 3de0c23d3..2f8af2454 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1573,7 +1573,15 @@ class OpenShiftFacts(object):
"Role %s is not supported by this module" % role
)
self.role = role
- self.system_facts = ansible_facts(module)
+
+ try:
+ # ansible-2.1
+ # pylint: disable=too-many-function-args
+ self.system_facts = ansible_facts(module, ['hardware', 'network', 'virtual', 'facter'])
+ except TypeError:
+ # ansible-1.9.x,ansible-2.0.x
+ self.system_facts = ansible_facts(module)
+
self.facts = self.generate_facts(local_facts,
additive_facts_to_overwrite,
openshift_env,