containers / ansible-podman-collections

Repository for Ansible content that can include playbooks, roles, modules, and plugins for use with the Podman tool
GNU General Public License v3.0
269 stars 148 forks source link

podman_container quadlet downloads image in checkrun #876

Open mstinsky opened 9 hours ago

mstinsky commented 9 hours ago

As the title stats. When using podman_container with state quadlet and running in check mode the module downloads the image defined in the ansible task. A checkrun should not do that and only show the quadlet file that is rendered.

Simple test:

- name: Test nginx
  containers.podman.podman_container:
    state: quadlet
    name: nginx-test
    image: docker.io/nginx:latest

Before running the task check podman images that shows the image does not exist. Running the task in check mode shows:

TASK [test : Test nginx] ******************************************************************************************************************************************************************************************************************************
--- before
+++ after
@@ -1 +1,4 @@
+[Container]
+ContainerName=nginx-test
+Image=docker.io/nginx:latest

/etc/containers/systemd does not have the quadlet file as expected but the image was downloaded:

podman images | grep nginx
docker.io/library/nginx                                    latest               3b25b682ea82  5 weeks ago    196 MB
sshnaidm commented 6 hours ago

Should be fixed by #872 in 1.16.2, please check your collection version