Browse Source

Merge pull request #1548 from brenton/bz1314645

Bug 1314645 - Upgrade failed with "One or more undefined variables 'd…
Brenton Leanhardt 9 years ago
parent
commit
f5cfeb6642

+ 8 - 3
playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml

@@ -56,16 +56,21 @@
 
   - name: Determine available versions
     script: ../files/rpm_versions.sh {{ g_new_service_name }}
-    register: g_versions_result
+    register: g_rpm_versions_result
+    when: not openshift.common.is_containerized | bool
+
+  - set_fact:
+      g_aos_versions: "{{ g_rpm_versions_result.stdout | from_yaml }}"
     when: not openshift.common.is_containerized | bool
 
   - name: Determine available versions
     script: ../files/openshift_container_versions.sh {{ openshift.common.service_type }}
-    register: g_versions_result
+    register: g_containerized_versions_result
     when: openshift.common.is_containerized | bool
 
   - set_fact:
-      g_aos_versions: "{{ g_versions_result.stdout | from_yaml }}"
+      g_aos_versions: "{{ g_containerized_versions_result.stdout | from_yaml }}"
+    when: openshift.common.is_containerized | bool
 
   - set_fact:
       g_new_version: "{{ g_aos_versions.curr_version.split('-', 1).0 if g_aos_versions.avail_version is none else g_aos_versions.avail_version.split('-', 1).0 }}"

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/rpm_upgrade.yml

@@ -1,5 +1,5 @@
 - name: Upgrade packages
-  command: "{{ ansible_pkg_mgr}} update -y {{ openshift.common.service_type }}-{{ component }}{{ openshift_version }}"
+  command: "{{ ansible_pkg_mgr}} update -y {{ openshift.common.service_type }}-{{ component }}-{{ g_new_version }}"
 
 - name: Ensure python-yaml present for config upgrade
   action: "{{ ansible_pkg_mgr }} name=PyYAML state=present"