summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2016-06-08 15:04:20 -0400
committerAndrew Butcher <abutcher@afrolegs.com>2016-06-08 15:04:20 -0400
commitc35f17f15639f71fa1e7b53fb01edeeee4c4b066 (patch)
tree933ec49604130ad8486e0f428b4fbf26a01607b9 /roles
parentbe14df1ed4a1c86afde034c834ea8db58413c14f (diff)
parent5701ba78c681e6f9efd841e76382e3aeb9853c9b (diff)
downloadopenshift-c35f17f15639f71fa1e7b53fb01edeeee4c4b066.tar.gz
openshift-c35f17f15639f71fa1e7b53fb01edeeee4c4b066.tar.bz2
openshift-c35f17f15639f71fa1e7b53fb01edeeee4c4b066.tar.xz
openshift-c35f17f15639f71fa1e7b53fb01edeeee4c4b066.zip
Merge pull request #1996 from abutcher/ansible-2.1
Ansible 2.1 support.
Diffstat (limited to 'roles')
-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,