remove extra fields from debug output

fixes #35493

updated tests
This commit is contained in:
Brian Coca
2018-02-16 09:59:54 -05:00
committed by Brian Coca
parent 6af5693dc2
commit a79378fccb
3 changed files with 7 additions and 7 deletions

View File

@@ -55,7 +55,6 @@ class CallbackBase(AnsiblePlugin):
'''
def __init__(self, display=None, options=None):
if display:
self._display = display
else:
@@ -78,6 +77,8 @@ class CallbackBase(AnsiblePlugin):
if options is not None:
self.set_options(options)
self._hide_in_debug = ('changed', 'failed', 'item', 'skipped', 'invocation')
''' helper for callbacks, so they don't all have to include deepcopy '''
_copy_result = deepcopy
@@ -236,7 +237,8 @@ class CallbackBase(AnsiblePlugin):
def _clean_results(self, result, task_name):
''' removes data from results for display '''
if task_name in ['debug']:
result.pop('invocation', None)
for hideme in self._hide_in_debug:
result.pop(hideme, None)
def set_play_context(self, play_context):
pass