mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user