Browse Source

Upgrade cri-o during node upgrade

Scott Dodson 6 years ago
parent
commit
07d6dcafa0
1 changed files with 16 additions and 0 deletions
  1. 16 0
      roles/openshift_node/tasks/upgrade.yml

+ 16 - 0
roles/openshift_node/tasks/upgrade.yml

@@ -20,6 +20,22 @@
   - l_docker_upgrade is defined
   - l_docker_upgrade | bool
 
+- name: Ensure cri-o is updated
+  package:
+    name: cri-o
+    state: latest
+  when:
+  - openshift_use_crio | default(False)
+  register: crio_update
+
+- name: Restart cri-o
+  systemd:
+    name: cri-o
+    state: restarted
+  when:
+  - openshift_use_crio | default(False)
+  - crio_update is changed
+
 - name: install pre-pulled rpms.
   import_tasks: upgrade/rpm_upgrade_install.yml
   when: not openshift_is_atomic | bool