From e1eb88def5d7d393b894b0d4466de1806a241364 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 10:30:42 +0200 Subject: [PATCH] [PR #10823/562d2ae5 backport][stable-11] parted: join command list for fail_json message (#10827) parted: join command list for fail_json message (#10823) * parted: join command list for fail_json message * add changelog frag (cherry picked from commit 562d2ae5b1e905c12bf784dfe2dd91417c2eedb5) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/10823-parted-fail-json-command.yml | 2 ++ plugins/modules/parted.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/10823-parted-fail-json-command.yml diff --git a/changelogs/fragments/10823-parted-fail-json-command.yml b/changelogs/fragments/10823-parted-fail-json-command.yml new file mode 100644 index 0000000000..8a52be589e --- /dev/null +++ b/changelogs/fragments/10823-parted-fail-json-command.yml @@ -0,0 +1,2 @@ +bugfixes: + - parted - variable is a list, not text (https://github.com/ansible-collections/community.general/pull/10823, https://github.com/ansible-collections/community.general/issues/10817). diff --git a/plugins/modules/parted.py b/plugins/modules/parted.py index 7af7b354f5..8e0d35037c 100644 --- a/plugins/modules/parted.py +++ b/plugins/modules/parted.py @@ -572,7 +572,7 @@ def parted(script, device, align): if rc != 0: module.fail_json( - msg="Error while running parted script: %s" % command.strip(), + msg="Error while running parted script: %s" % " ".join(command).strip(), rc=rc, out=out, err=err )