summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-12-18 16:49:05 -0500
committerScott Dodson <sdodson@redhat.com>2018-01-17 13:32:12 -0500
commit9a02a7a96d4de691e1f265e88ff4d5ee3f0b7244 (patch)
tree5282a31fdb6cc85df5a41dd155001e54b834fb1e /roles/openshift_master
parentda12b2c603eea973466c47b5d6d668ddea6b05fd (diff)
downloadopenshift-9a02a7a96d4de691e1f265e88ff4d5ee3f0b7244.tar.gz
openshift-9a02a7a96d4de691e1f265e88ff4d5ee3f0b7244.tar.bz2
openshift-9a02a7a96d4de691e1f265e88ff4d5ee3f0b7244.tar.xz
openshift-9a02a7a96d4de691e1f265e88ff4d5ee3f0b7244.zip
Exclude 3.9 packages during 3.8 upgrade
There are some obsoletes in 3.9 packages which lead yum to upgrade directly from 3.7 to 3.9 when you ask for 3.8 packages while 3.9 repos are enabled. Since we'd like to allow people to run one playbook to upgrade from 3.7 to 3.8 to 3.9 we need to exclude those packages when upgrading to 3.8
Diffstat (limited to 'roles/openshift_master')
-rw-r--r--roles/openshift_master/tasks/upgrade/rpm_upgrade.yml23
1 files changed, 21 insertions, 2 deletions
diff --git a/roles/openshift_master/tasks/upgrade/rpm_upgrade.yml b/roles/openshift_master/tasks/upgrade/rpm_upgrade.yml
index 96079884e..7af754818 100644
--- a/roles/openshift_master/tasks/upgrade/rpm_upgrade.yml
+++ b/roles/openshift_master/tasks/upgrade/rpm_upgrade.yml
@@ -8,8 +8,10 @@
# TODO: If the sdn package isn't already installed this will install it, we
# should fix that
-- name: Upgrade master packages
- package: name={{ master_pkgs | join(',') }} state=present
+- name: Upgrade master packages - yum
+ command:
+ yum install -y {{ master_pkgs | join(' ') }} \
+ {{ ' --exclude *' ~ openshift_service_type ~ '*3.9*' if openshift_release | version_compare('3.9','<') else '' }}
vars:
master_pkgs:
- "{{ openshift_service_type }}{{ openshift_pkg_version | default('') }}"
@@ -19,3 +21,20 @@
- "{{ openshift_service_type }}-clients{{ openshift_pkg_version | default('') }}"
register: result
until: result is succeeded
+ when: ansible_pkg_mgr == 'yum'
+
+- name: Upgrade master packages - dnf
+ dnf:
+ name: "{{ master_pkgs | join(',') }}"
+ state: present
+ vars:
+ master_pkgs:
+ - "{{ openshift_service_type }}{{ openshift_pkg_version }}"
+ - "{{ openshift_service_type }}-master{{ openshift_pkg_version }}"
+ - "{{ openshift_service_type }}-node{{ openshift_pkg_version }}"
+ - "{{ openshift_service_type }}-sdn-ovs{{ openshift_pkg_version }}"
+ - "{{ openshift_service_type }}-clients{{ openshift_pkg_version }}"
+ - "tuned-profiles-{{ openshift_service_type }}-node{{ openshift_pkg_version }}"
+ register: result
+ until: result is succeeded
+ when: ansible_pkg_mgr == 'dnf'