From d92299e66cc43e4d30168088c8a7f2421a69a03d Mon Sep 17 00:00:00 2001 From: Thomas Kleinendorst Date: Wed, 5 Jun 2024 16:55:31 +0200 Subject: [PATCH] Add comment on the podman_image task --- roles/podman-container/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/podman-container/tasks/main.yml b/roles/podman-container/tasks/main.yml index 756f3cb..a06a6eb 100644 --- a/roles/podman-container/tasks/main.yml +++ b/roles/podman-container/tasks/main.yml @@ -29,6 +29,9 @@ # ⬇️ Run either when the image doesn't exist or is outdated when: container_info.containers | length == 0 or not container_info.containers[0]["Config"]["Image"] is match(".*:" + podman_container_tag) block: + # The image would already be downloaded in the step where the container is started (if the image is missing from the system). However, + # this specifically fixes an issue where the DNS server is temporarily unavailable when the pi-hole container is removed first and then recreated. + # By ensuring that the correct image is already on the machine it doesn't fail when downloading because it can't resolve the address. - name: Pull the requested image before removal of container containers.podman.podman_image: name: "{{ podman_container_image }}:{{ podman_container_tag }}"