From 618cba101b3c92c5a2e7a0805d567269716b32af Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 7 Dec 2020 18:05:17 +0100 Subject: [PATCH] container-host: restart docker service Once the mirror has been added in `/etc/docker/daemon.json` we need to restart the daemon. This is not very elegant but it's a workaround for now. Signed-off-by: Guillaume Abrioux --- roles/container-host/tasks/container_mirror.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/container-host/tasks/container_mirror.yml b/roles/container-host/tasks/container_mirror.yml index 5bc0c12..1a6877b 100644 --- a/roles/container-host/tasks/container_mirror.yml +++ b/roles/container-host/tasks/container_mirror.yml @@ -35,3 +35,9 @@ command: registries-conf-ctl add-mirror docker.io "{{ container_mirror }}" environment: PATH: /usr/local/bin:/usr/bin + +# not very elegant but it's a workaround for now +- name: Restart docker service + service: docker + state: restarted + when: "'docker.io' in container_packages" -- 2.39.5