From 542986cd8a5343a5cd93812bc9550e493bdaacf5 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Thu, 30 Jun 2022 18:58:39 +0300 Subject: [PATCH] Pass errors as a string instead of list --- plugins/modules/podman_play.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/podman_play.py b/plugins/modules/podman_play.py index 56b87db..3e29dee 100644 --- a/plugins/modules/podman_play.py +++ b/plugins/modules/podman_play.py @@ -241,8 +241,8 @@ class PodmanKubeManagement: changed = True else: changed = False - err = [ - i for i in err.splitlines() if 'pod already exists' not in i] + err = "\n".join([ + i for i in err.splitlines() if 'pod already exists' not in i]) elif rc != 0: self.module.fail_json(msg="Output: %s\nError=%s" % (out, err)) else: