Closed wkulhanek closed 3 years ago
@wkulhanek tbh I don't understand the reproducing. The playbook you run is supposed to pull docker.io/wkulhanek/logtofile:0.1
({{ r_images.images[0].RepoTags[0] }}
in your task) and it pulls it. You don't try to pull the latest
.
But if I put latest
in task, then yes, it runs podman image ls docker.io/wkulhanek/logtofile:latest
and finds it, and if there is no force pull, then nothing is done. It's by design.
Podman command just has force pulling by default.
I'm not sure it should be default for the module though.
@sshnaidm the image had changed. Tag was still 1.0 but the sha was different.
@sshnaidm the image had changed. Tag was still 1.0 but the sha was different.
Anyway, if image exists with podman image ls <image_name>:<image_tag>
, it won't be pulled by module until force
is set. The force
is false
by default.
With the option force: yes
, if the new dowloaded image had a new digest the task status is changed
.
I had to read the podman_image
module source code to understand it, the documentation was not enough.
/kind bug
Description
Wrote a playbook to update local images automatically. Found that when an image is already present on the target machine the image does not get pulled - even if there is a newer tag available in the repository. This is a problem when using "latest" or "version" tags that always point to the latest image of a major version.
force does force the image download but that should not be required.
Steps to reproduce the issue:
Describe the results you received: No image was updated
Describe the results you expected: Expected the image to be updated. latest points to tag 0.2
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Playbok you run with ansible (e.g. content of
playbook.yaml
):Command line and output of ansible run with high verbosity:
Additional environment details (AWS, VirtualBox, physical, etc.): Bare Metal machine running Fedora Server 33 (with latest updates)