summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted_facts
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-04-28 14:50:04 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-05-03 16:24:41 -0400
commit60c4e41791c9517ad7201c8c04f0fee2bff8873c (patch)
treea69d7445d088bb068a0192848a8f670b3528b6de /roles/openshift_hosted_facts
parent2f87e0c3f19d313cf16bf91d88a00c7a2938a3d8 (diff)
downloadopenshift-60c4e41791c9517ad7201c8c04f0fee2bff8873c.tar.gz
openshift-60c4e41791c9517ad7201c8c04f0fee2bff8873c.tar.bz2
openshift-60c4e41791c9517ad7201c8c04f0fee2bff8873c.tar.xz
openshift-60c4e41791c9517ad7201c8c04f0fee2bff8873c.zip
Replace hostvars with vars for openshift env facts when ansible >= v2.
Diffstat (limited to 'roles/openshift_hosted_facts')
-rw-r--r--roles/openshift_hosted_facts/tasks/main.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/openshift_hosted_facts/tasks/main.yml b/roles/openshift_hosted_facts/tasks/main.yml
index f595e1e81..897fc0b35 100644
--- a/roles/openshift_hosted_facts/tasks/main.yml
+++ b/roles/openshift_hosted_facts/tasks/main.yml
@@ -3,5 +3,7 @@
openshift_facts:
role: hosted
openshift_env: "{{ hostvars[inventory_hostname]
- | oo_merge_dicts(hostvars)
+ | oo_merge_dicts(vars if (ansible_version.full
+ | version_compare('2.0', 'ge')
+ | bool) else hostvars)
| oo_openshift_env }}"