From f126eddff1544663e3bc2adc55cf639fa7b092b4 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 11 Jul 2018 18:01:42 -0700 Subject: [PATCH] return wu result from inner job (#42647) fixes #42423 (cherry picked from commit a5fc9a17f05066dfbe3b499c6fc3202cc6126e8e) --- changelogs/fragments/42647-win_updates.yaml | 2 ++ lib/ansible/modules/windows/win_updates.ps1 | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/42647-win_updates.yaml diff --git a/changelogs/fragments/42647-win_updates.yaml b/changelogs/fragments/42647-win_updates.yaml new file mode 100644 index 00000000000..6dfd2523238 --- /dev/null +++ b/changelogs/fragments/42647-win_updates.yaml @@ -0,0 +1,2 @@ +bugfixes: +- win_updates - fixed module return value is lost in error in some cases (https://github.com/ansible/ansible/pull/42647) diff --git a/lib/ansible/modules/windows/win_updates.ps1 b/lib/ansible/modules/windows/win_updates.ps1 index 374b82ef8c8..0962d366694 100644 --- a/lib/ansible/modules/windows/win_updates.ps1 +++ b/lib/ansible/modules/windows/win_updates.ps1 @@ -355,6 +355,8 @@ $update_script_block = { } Write-DebugLog -msg "Return value:`r`n$(ConvertTo-Json -InputObject $result -Depth 99)" + + return $result } $check_mode = $arguments.check_mode