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 )