From 386c739d5bd9cd12b382d774e289f7edff883d77 Mon Sep 17 00:00:00 2001 From: Mostafa Ghadimi Date: Mon, 22 Aug 2022 18:47:43 +0430 Subject: [PATCH] :seedling: Enable cri-dockerd service (#9201) * :seedling: Enable cri-dockerd service * :hammer: Fix the task name in order to pass the CI tests --- roles/container-engine/cri-dockerd/handlers/main.yml | 8 +++++++- roles/container-engine/cri-dockerd/tasks/main.yml | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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