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

This commit is contained in:
Jordan Borean 2018-06-21 07:52:24 +10:00 committed by Matt Davis
parent 8bd245a6a2
commit 11bd3fd318
3 changed files with 40 additions and 1 deletions

View file

@ -213,7 +213,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