From 46d4378426e25a000332e425d4e9e8ab26343dc8 Mon Sep 17 00:00:00 2001 From: Sergey <6213510+sshnaidm@users.noreply.github.com> Date: Thu, 5 Sep 2024 19:31:28 +0300 Subject: [PATCH] Fix command idempotency with quotes (#839) Fix #838 Signed-off-by: Sagi Shnaidman --- plugins/module_utils/podman/podman_container_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index 78af30fc..5166e460 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -1039,7 +1039,8 @@ def _join_quotes(com_list): if self.module_params['command'] is not None: before = self.info['config']['cmd'] after = self.params['command'] - before = _join_quotes(before) + if before: + before = _join_quotes(before) if isinstance(after, list): after = [str(i) for i in after] if isinstance(after, str):