|
|
@ -26,6 +26,7 @@ import warnings
|
|
|
|
from copy import deepcopy
|
|
|
|
from copy import deepcopy
|
|
|
|
|
|
|
|
|
|
|
|
from ansible import constants as C
|
|
|
|
from ansible import constants as C
|
|
|
|
|
|
|
|
from ansible.parsing.ajson import AnsibleJSONEncoder
|
|
|
|
from ansible.plugins import AnsiblePlugin, get_plugin_class
|
|
|
|
from ansible.plugins import AnsiblePlugin, get_plugin_class
|
|
|
|
from ansible.module_utils._text import to_text
|
|
|
|
from ansible.module_utils._text import to_text
|
|
|
|
from ansible.utils.color import stringc
|
|
|
|
from ansible.utils.color import stringc
|
|
|
@ -122,7 +123,7 @@ class CallbackBase(AnsiblePlugin):
|
|
|
|
if 'exception' in abridged_result:
|
|
|
|
if 'exception' in abridged_result:
|
|
|
|
del abridged_result['exception']
|
|
|
|
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):
|
|
|
|
def _handle_warnings(self, res):
|
|
|
|
''' display warnings, if enabled and any exist in the result '''
|
|
|
|
''' display warnings, if enabled and any exist in the result '''
|
|
|
|