summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-06-07 14:37:34 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-06-07 14:37:34 -0300
commitdd8501ca8199484531e0a6d2b40139d4085afefa (patch)
tree9d2979b191b3f003bc868d29053e472af72ec048
parenteffc29ad8a0822b3981ff833fe66cc70f4e1e68c (diff)
downloadopenshift-dd8501ca8199484531e0a6d2b40139d4085afefa.tar.gz
openshift-dd8501ca8199484531e0a6d2b40139d4085afefa.tar.bz2
openshift-dd8501ca8199484531e0a6d2b40139d4085afefa.tar.xz
openshift-dd8501ca8199484531e0a6d2b40139d4085afefa.zip
Force version to latest 3.2 during upgrade.
-rw-r--r--playbooks/common/openshift-cluster/initialize_openshift_version.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml4
-rw-r--r--roles/openshift_version/tasks/main.yml4
3 files changed, 8 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/initialize_openshift_version.yml b/playbooks/common/openshift-cluster/initialize_openshift_version.yml
index 88ec7840b..098558c01 100644
--- a/playbooks/common/openshift-cluster/initialize_openshift_version.yml
+++ b/playbooks/common/openshift-cluster/initialize_openshift_version.yml
@@ -19,7 +19,7 @@
- debug: var=openshift.common.version
- debug: var=openshift_version
- set_fact:
- openshift_version: "{{ openshift.common.version if openshift.common.version is defined else hostvars[groups.oo_first_master.0].openshift_version }}"
+ openshift_version: "{{ openshift.common.version if (openshift.common.version is defined and openshift_version is not defined) else hostvars[groups.oo_first_master.0].openshift_version }}"
when: inventory_hostname != groups.oo_first_master.0
- debug: var=hostvars[groups.oo_first_master.0].openshift_version
- debug: var=openshift.common.version
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
index e4be39f91..f9ca26e34 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml
@@ -66,7 +66,9 @@
- include: ../../../../common/openshift-cluster/initialize_openshift_version.yml
vars:
- openshift_release: "3.2"
+ # Force the openshift_version role to 3.2, it will convert this to a more specific variable and
+ # make sure the openshift_image_tag and openshift_pkg_version are all set appropriately.
+ openshift_version: "3.2"
- name: Verify upgrade can proceed on masters
hosts: oo_masters_to_config
diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml
index ee04ad59f..1cfbff1b0 100644
--- a/roles/openshift_version/tasks/main.yml
+++ b/roles/openshift_version/tasks/main.yml
@@ -26,4 +26,8 @@
- debug: var=openshift_version
+# At this point we know openshift_version is set appropriately. Now we set
+# openshift_image_tag and openshift_pkg_version, so all roles can always assume
+# each of this variables *will* be set correctly and can use them per their
+# intended purpose.