From 562d2ae5b1e905c12bf784dfe2dd91417c2eedb5 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 13 Sep 2025 19:17:05 +1200 Subject: [PATCH] parted: join command list for fail_json message (#10823) * parted: join command list for fail_json message * add changelog frag --- 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 )