From 64daaf18875877a89f39dbea99e49f3eae7f2793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20M=C5=82ynek?= <75165213+krystianmlynek@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:50:02 +0200 Subject: [PATCH] cri-dockerd: add restart of docker.service (#9205) * cri-dockerd: add restart of docker.service * remove enabling of cri-dockerd.socket --- roles/container-engine/cri-dockerd/handlers/main.yml | 6 ++++++ roles/container-engine/cri-dockerd/tasks/main.yml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/roles/container-engine/cri-dockerd/handlers/main.yml b/roles/container-engine/cri-dockerd/handlers/main.yml index e5527d0f6..9d9d8c643 100644 --- a/roles/container-engine/cri-dockerd/handlers/main.yml +++ b/roles/container-engine/cri-dockerd/handlers/main.yml @@ -3,6 +3,7 @@ command: /bin/true notify: - cri-dockerd | reload systemd + - cri-dockerd | restart docker.service - cri-dockerd | reload cri-dockerd.socket - cri-dockerd | reload cri-dockerd.service - cri-dockerd | enable cri-dockerd service @@ -13,6 +14,11 @@ daemon_reload: true masked: no +- name: cri-dockerd | restart docker.service + service: + name: docker.service + state: restarted + - name: cri-dockerd | reload cri-dockerd.socket service: name: cri-dockerd.socket diff --git a/roles/container-engine/cri-dockerd/tasks/main.yml b/roles/container-engine/cri-dockerd/tasks/main.yml index 7ee4617de..9ce3ec6ef 100644 --- a/roles/container-engine/cri-dockerd/tasks/main.yml +++ b/roles/container-engine/cri-dockerd/tasks/main.yml @@ -23,3 +23,6 @@ - cri-dockerd.socket notify: - restart and enable cri-dockerd + +- name: Flush handlers + meta: flush_handlers