mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07: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:
parent
f86c527736
commit
292785ff2b
5 changed files with 29 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue