|
|
|
@ -107,10 +107,19 @@ class CallbackBase:
|
|
|
|
|
except UnicodeDecodeError:
|
|
|
|
|
ret.append(">> the files are different, but the diff library cannot compare unicode strings\n\n")
|
|
|
|
|
|
|
|
|
|
def _get_item(self, result):
|
|
|
|
|
if '_ansible_no_log' in result:
|
|
|
|
|
item = "(censored due to no_log)"
|
|
|
|
|
else:
|
|
|
|
|
item = getattr(result, 'item', "(censored due to no_log)")
|
|
|
|
|
|
|
|
|
|
return item
|
|
|
|
|
|
|
|
|
|
def _process_items(self, result):
|
|
|
|
|
|
|
|
|
|
for res in result._result['results']:
|
|
|
|
|
newres = deepcopy(result)
|
|
|
|
|
res['item'] = self._get_item(res)
|
|
|
|
|
newres._result = res
|
|
|
|
|
if 'failed' in res and res['failed']:
|
|
|
|
|
self.v2_playbook_item_on_failed(newres)
|
|
|
|
@ -119,7 +128,7 @@ class CallbackBase:
|
|
|
|
|
else:
|
|
|
|
|
self.v2_playbook_item_on_ok(newres)
|
|
|
|
|
|
|
|
|
|
#del result._result['results']
|
|
|
|
|
del result._result['results']
|
|
|
|
|
|
|
|
|
|
def set_play_context(self, play_context):
|
|
|
|
|
pass
|
|
|
|
@ -202,9 +211,7 @@ class CallbackBase:
|
|
|
|
|
def v2_runner_on_skipped(self, result):
|
|
|
|
|
if C.DISPLAY_SKIPPED_HOSTS:
|
|
|
|
|
host = result._host.get_name()
|
|
|
|
|
#FIXME, get item to pass through
|
|
|
|
|
item = None
|
|
|
|
|
self.runner_on_skipped(host, item)
|
|
|
|
|
self.runner_on_skipped(host, self._get_item(getattr(result._result,'results',{})))
|
|
|
|
|
|
|
|
|
|
def v2_runner_on_unreachable(self, result):
|
|
|
|
|
host = result._host.get_name()
|
|
|
|
|