Skip to content

Commit

Permalink
Fix callback._dump_results to dump vaulted data v2 (ansible#39975)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrizek authored May 11, 2018
1 parent fea71d2 commit b2929f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/plugins/callback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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
Expand Down Expand Up @@ -122,7 +123,7 @@ def _dump_results(self, result, indent=None, sort_keys=True, keep_invocation=Fal
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 '''
Expand Down

0 comments on commit b2929f0

Please sign in to comment.