summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml
blob: 164baca81994cfbbb1a91fe645b25cf22fbc3ce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
# When we update package "a-${version}" and a requires b >= ${version} if we
# don't specify the version of b yum will choose the latest version of b
# available and the whole set of dependencies end up at the latest version.
# Since the package module, unlike the yum module, doesn't flatten a list
# of packages into one transaction we need to do that explicitly. The ansible
# core team tells us not to rely on yum module transaction flattening anyway.

# 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
  vars:
    master_pkgs:
      - "{{ openshift.common.service_type }}{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-master{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version}}"
      - "{{ openshift.common.service_type }}-clients{{ openshift_pkg_version }}"
      - "tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}"
      - PyYAML
  when:
    - component == "master"
    - not openshift.common.is_atomic | bool

- name: Upgrade node packages
  package: name={{ node_pkgs | join(',') }} state=present
  vars:
    node_pkgs:
      - "{{ openshift.common.service_type }}{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version }}"
      - "{{ openshift.common.service_type }}-clients{{ openshift_pkg_version }}"
      - "tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}"
      - PyYAML
  when:
    - component == "node"
    - not openshift.common.is_atomic | bool