1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Remove docker protocol when inspecting image (#901)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Signed-off-by: johnsonlien <johnsonlien95@gmail.com>
This commit is contained in:
Sergey 2025-02-17 15:17:47 +02:00 committed by johnsonlien
parent d00b2deab1
commit 7b5ec059ec

View file

@ -1621,7 +1621,11 @@ class PodmanContainer:
if is_rootfs:
return {'Id': self.module_params['image']}
rc, out, err = self.module.run_command(
[self.module_params['executable'], b'image', b'inspect', self.module_params['image']])
[self.module_params['executable'],
b'image',
b'inspect',
self.module_params['image'].replace('docker://', '')])
self.module.log("PODMAN-CONTAINER-DEBUG: %s: %s" % (out, self.module_params['image']))
return json.loads(out)[0] if rc == 0 else {}
def _get_podman_version(self):