Skip to content
Snippets Groups Projects
Unverified Commit fc224536 authored by Hans Feldt's avatar Hans Feldt Committed by GitHub
Browse files

crio: avoid extra restart after install and upgrade (#6882)

Package upgrade restarts crio. By creating/updating config first,
an extra restart can be avoided.
parent fefcb8c9
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,12 @@
path: "{{ item }}"
state: directory
- name: Install cri-o config
template:
src: crio.conf.j2
dest: /etc/crio/crio.conf
register: config_install
- name: Install cri-o packages
package:
name: "{{ item }}"
......@@ -112,12 +118,6 @@
- 100-crio-bridge.conf
- 200-loopback.conf
- name: Install cri-o config
template:
src: crio.conf.j2
dest: /etc/crio/crio.conf
notify: restart crio
- name: Copy mounts.conf
copy:
src: mounts.conf
......@@ -156,6 +156,16 @@
daemon_reload: true
enabled: true
state: started
register: service_start
- name: Trigger service restart only when needed
service: # noqa 503
name: crio
state: restarted
when:
- config_install.changed
- not package_install.changed
- not service_start.changed
- name: Verify that crio is running
command: "crio-status info"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment