From d1a5219ae3a124fc3c89fd994e57721d4166abe3 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Fri, 4 Mar 2016 13:40:56 -0500 Subject: Bug 1314645 - Upgrade failed with "One or more undefined variables 'dict object' has no attribute 'stdout'" --- .../common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml | 11 ++++++++--- .../openshift-cluster/upgrades/v3_1_to_v3_2/rpm_upgrade.yml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'playbooks/common') 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 343cc0851..d423238ec 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 @@ -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 }}" diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/rpm_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/rpm_upgrade.yml index 0d6fa871b..7a2718e1b 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/rpm_upgrade.yml +++ b/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" -- cgit v1.2.3