summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/upgrade/rpm_upgrade.yml
blob: 120b93bc3660a4d2abacc1b4062c354e1c07aa22 (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
---
# input variables:
# - openshift_service_type
# - component
# - openshift_pkg_version
# - openshift.common.is_atomic

# We verified latest rpm available is suitable, so just yum update.
- name: Upgrade packages
  package: "name={{ openshift_service_type }}-{{ component }}{{ openshift_pkg_version }} state=present"
  register: result
  until: result | success

- name: Ensure python-yaml present for config upgrade
  package: name=PyYAML state=present
  when: not openshift.common.is_atomic | bool
  register: result
  until: result | success

- name: Install Node service file
  template:
    dest: "/etc/systemd/system/{{ openshift_service_type }}-node.service"
    src: "node.service.j2"
  register: l_node_unit

# NOTE: This is needed to make sure we are using the correct set
#       of systemd unit files. The RPMs lay down defaults but
#       the install/upgrade may override them in /etc/systemd/system/.
# NOTE: We don't use the systemd module as some versions of the module
#       require a service to be part of the call.
- name: Reload systemd units
  command: systemctl daemon-reload
  when: l_node_unit | changed