1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-04-30 12:58:57 +00:00

Fix issue with pushing podman image to repo name and org (#771)

If destination doesn't have image, but only repo name and org,
complete with image name and tag.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2024-06-02 21:01:06 +03:00 committed by GitHub
parent abb667546c
commit 4cb8404b7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 0 deletions

View file

@ -797,6 +797,9 @@ class PodmanImageManager(object):
dest_string = dest_format_string.format(transport=transport, name=self.name, dest=dest)
else:
dest_string = dest
# In case of dest as a repository with org name only, append image name to it
if ":" not in dest and "@" not in dest and len(dest.rstrip("/").split("/")) == 2:
dest_string = dest.rstrip("/") + "/" + self.image_name
if "/" not in dest_string and "@" not in dest_string and "docker-daemon" not in dest_string:
self.module.fail_json(msg="Destination must be a full URL or path to a directory.")