diff --git a/roles/container-engine/cri-dockerd/handlers/main.yml b/roles/container-engine/cri-dockerd/handlers/main.yml index 1cc890a79..e5527d0f6 100644 --- a/roles/container-engine/cri-dockerd/handlers/main.yml +++ b/roles/container-engine/cri-dockerd/handlers/main.yml @@ -1,10 +1,11 @@ --- -- name: restart cri-dockerd +- name: restart and enable cri-dockerd command: /bin/true notify: - cri-dockerd | reload systemd - cri-dockerd | reload cri-dockerd.socket - cri-dockerd | reload cri-dockerd.service + - cri-dockerd | enable cri-dockerd service - name: cri-dockerd | reload systemd systemd: @@ -21,3 +22,8 @@ service: name: cri-dockerd.service state: restarted + +- name: cri-dockerd | enable cri-dockerd service + service: + name: cri-dockerd.service + enabled: yes diff --git a/roles/container-engine/cri-dockerd/tasks/main.yml b/roles/container-engine/cri-dockerd/tasks/main.yml index 49ba8ef01..7ee4617de 100644 --- a/roles/container-engine/cri-dockerd/tasks/main.yml +++ b/roles/container-engine/cri-dockerd/tasks/main.yml @@ -11,7 +11,7 @@ mode: 0755 remote_src: true notify: - - restart cri-dockerd + - restart and enable cri-dockerd - name: Generate cri-dockerd systemd unit files template: @@ -22,4 +22,4 @@ - cri-dockerd.service - cri-dockerd.socket notify: - - restart cri-dockerd + - restart and enable cri-dockerd