Parse async response in async action. (#16534)

* Parse async response in async action.
* Add async test for non-JSON data before module output.
* Fix existing async unit test.

Resolves #16156
This commit is contained in:
Matt Clay 2016-07-01 14:52:45 -07:00 committed by GitHub
parent f86c527736
commit 292785ff2b
5 changed files with 29 additions and 12 deletions

View file

@ -99,4 +99,11 @@ class ActionModule(ActionBase):
result['changed'] = True
if 'skipped' in result and result['skipped'] or 'failed' in result and result['failed']:
return result
# the async_wrapper module returns dumped JSON via its stdout
# response, so we parse it here and replace the result
result = self._parse_returned_data(result)
return result