From 559599842a1726127766e7a47caff7000d7e621d Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Thu, 30 Aug 2018 00:13:31 +1000 Subject: [PATCH] windows async: return pipeline output in case of a failure (#44807) --- lib/ansible/plugins/shell/powershell.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py index 6b1208ef470..454784fe472 100644 --- a/lib/ansible/plugins/shell/powershell.py +++ b/lib/ansible/plugins/shell/powershell.py @@ -1417,6 +1417,9 @@ Function Run($payload) { $result.failed = $true $result.msg = "failed to parse module output: $excep" + # return the output back to Ansible to help with debugging errors + $result.stdout = $job_output | Out-String + $result.stderr = $job_error | Out-String } # TODO: determine success/fail, or always include stderr if nonempty?