From a05be890adc28a1a985cdc2891a819e535728a68 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 5 Jun 2019 14:05:26 -0700 Subject: [PATCH] Fix podman_image_info parsing of podman output. Stripping the output from `podman image ls -q` prevents passing a blank image ID to `podman image inspect`, which would fail. --- lib/ansible/modules/cloud/podman/podman_image_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/podman/podman_image_info.py b/lib/ansible/modules/cloud/podman/podman_image_info.py index c7f148ba9b3..071a1cbbfc0 100644 --- a/lib/ansible/modules/cloud/podman/podman_image_info.py +++ b/lib/ansible/modules/cloud/podman/podman_image_info.py @@ -173,7 +173,7 @@ def get_image_info(module, executable, name): def get_all_image_info(module, executable): command = [executable, 'image', 'ls', '-q'] rc, out, err = module.run_command(command) - name = out.split('\n') + name = out.strip().split('\n') out = get_image_info(module, executable, name) return out