diff --git a/changelogs/fragments/24633-copy-coherency-between-check-normal-mode.yaml b/changelogs/fragments/24633-copy-coherency-between-check-normal-mode.yaml new file mode 100644 index 0000000000..44dc5ab4cf --- /dev/null +++ b/changelogs/fragments/24633-copy-coherency-between-check-normal-mode.yaml @@ -0,0 +1,2 @@ +bugfixes: + - copy - align invocation in return value between check and normal mode diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index 13007d3e75..198c55c2a5 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -216,7 +216,10 @@ class ActionModule(ActionBase): if self._play_context.no_log: result['invocation'] = "CENSORED: no_log is set" else: - result["invocation"] = self._task.args.copy() + # NOTE: Should be removed in the future. For now keep this broken + # behaviour, have a look in the PR 51582 + result['invocation'] = self._task.args.copy() + result['invocation']['module_args'] = self._task.args.copy() if isinstance(result['invocation'], dict) and 'content' in result['invocation']: result['invocation']['content'] = 'CENSORED: content is a no_log parameter'