summaryrefslogtreecommitdiffstats
path: root/roles/openshift_common
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_common')
-rw-r--r--roles/openshift_common/tasks/main.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index ff8c3b50f..98b0b11ea 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -39,11 +39,15 @@
action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version | default('') }} state=present"
when: not openshift.common.is_containerized | bool
-- name: Set version facts
+# This invocation also updates the version facts which are necessary
+# for setting the hostname below.
+- name: openshift_facts
openshift_facts:
+ role: hosted
+ openshift_env: "{{ hostvars[inventory_hostname] | oo_openshift_env }}"
- # For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
- # hostname by default.
+# For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
+# hostname by default.
- set_fact:
set_hostname_default: "{{ not openshift.common.version_greater_than_3_1_or_1_1 }}"