win_updates fix when win_updates is run with async (#41756) (#41763)

(cherry picked from commit 11bd3fd318)
pull/41777/head
Jordan Borean 8 years ago committed by Matt Davis
parent 317388e967
commit 2f0cfa857a

@ -0,0 +1,2 @@
bugfixes:
- win_updates - Fixed issue where running win_updates on async fails without any error

@ -190,7 +190,7 @@ class ActionModule(ActionBase):
# so we just return the result as is
# https://github.com/ansible/ansible/issues/38232
failed = result.get('failed', False)
if "updates" not in result.keys() or failed:
if ("updates" not in result.keys() and self._task.async_val == 0) or failed:
result['failed'] = True
return result

Loading…
Cancel
Save