1
0
Fork 0
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:
Martin Krizek 2018-05-11 07:44:29 +02:00 committed by GitHub
parent fea71d2767
commit b2929f0eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 '''