ansible-podman-collections
ansible-podman-collections copied to clipboard
Issues pulling images with similar tags (cannot pull one with a shorter left substring than a pre-existing image)
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When attempting to pull an image with a tag that is a left substring of a pre-existing image using containers.podman.podman_image, the image pull operation fails and returns Error: error inspecting object: no such object
.
Steps to reproduce the issue:
Run the below playbook: `- hosts: target become: true gather_facts: true
tasks: - name: Pull RabbitMQ Image - Management containers.podman.podman_image: name: rabbitmq tag: 3.12-management become: true become_user: "usera"
- name: Pull RabbitMQ Image - Standard
containers.podman.podman_image:
name: rabbitmq
tag: 3.12
become: true
become_user: "usera"`
Describe the results you received: PLAY [target] *****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************************************** ok: [target]
TASK [Pull RabbitMQ Image - Management] ************************************************************************************************************************************************************************************************************ ok: [target]
TASK [Pull RabbitMQ Image - Standard] ************************************************************************************************************************************************************************************************************** fatal: [target]: FAILED! => {"changed": false, "msg": "Failed to run ['/bin/podman', 'inspect', 'rabbitmq:3.12', '--format', 'json'] ['inspect', 'rabbitmq:3.12', '--format', 'json']: Error: error inspecting object: no such object: "rabbitmq:3.12"\n"}
Describe the results you expected: I would expect both images to be pulled successfully. If I remove the first image and then just run the second task, it works as expected. It appears to be an issue with it failing to differentiate between the tags '3.12-management' and '3.12' on whether to pull or not.
Additional information you deem important (e.g. issue happens only occasionally): I have been able to replicate this consistently with a couple of different images using the collection v1.12.0 and v1.13.0
Version of the containers.podman
collection:
v1.13.0 - installed from Ansible Galaxy
Output of ansible --version
:
ansible [core 2.15.9]
python v 3.9.5
Output of podman version
:
3.3.1 - I have confirmed that I can perform this task successfully using podman commands natively, so not a podman issue.