mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix callback._dump_results to dump vaulted data v2 (#39975)
This commit is contained in:
parent
fea71d2767
commit
b2929f0eba
1 changed files with 2 additions and 1 deletions
|
@ -26,6 +26,7 @@ import warnings
|
|||
from copy import deepcopy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins import AnsiblePlugin, get_plugin_class
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.utils.color import stringc
|
||||
|
@ -122,7 +123,7 @@ class CallbackBase(AnsiblePlugin):
|
|||
if 'exception' in abridged_result:
|
||||
del abridged_result['exception']
|
||||
|
||||
return json.dumps(abridged_result, indent=indent, ensure_ascii=False, sort_keys=sort_keys)
|
||||
return json.dumps(abridged_result, cls=AnsibleJSONEncoder, indent=indent, ensure_ascii=False, sort_keys=sort_keys)
|
||||
|
||||
def _handle_warnings(self, res):
|
||||
''' display warnings, if enabled and any exist in the result '''
|
||||
|
|
Loading…
Add table
Reference in a new issue