mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-03-22 02:29:08 +00:00
Loop over image names when multiple images present in archive (#413)
Signed-off-by: Cory Prelerson <cprelerson42@gmail.com>
This commit is contained in:
parent
f1d68c0fbd
commit
b51dc5c814
2 changed files with 29 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ def load(module, executable):
|
|||
if rc != 0:
|
||||
module.fail_json(msg="Image loading failed: %s" % (err))
|
||||
image_name_line = [i for i in out.splitlines() if 'Loaded image' in i][0]
|
||||
image_name = image_name_line.split(":", maxsplit=1)[1].strip()
|
||||
image_name = image_name_line.split("Loaded image(s): ")[1].split(',')[0].strip()
|
||||
rc, out2, err2 = module.run_command([executable, 'image', 'inspect', image_name])
|
||||
if rc != 0:
|
||||
module.fail_json(msg="Image %s inspection failed: %s" % (image_name, err2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue