clean debug output to match prev versions

pull/13567/head
Brian Coca 9 years ago
parent 6e1bb6c87d
commit 5ab25e2dfe

@ -140,6 +140,12 @@ class CallbackBase:
else:
self.v2_playbook_item_on_ok(newres)
def _clean_results(self, result, task_name):
if 'changed' in result and task_name in ['debug']:
del result['changed']
if 'invocation' in result and task_name in ['debug']:
del result['invocation']
def set_play_context(self, play_context):
pass

@ -62,6 +62,7 @@ class CallbackModule(CallbackBase):
def v2_runner_on_ok(self, result):
self._clean_results(result._result, result._task.action)
delegated_vars = result._result.get('_ansible_delegated_vars', None)
if result._task.action == 'include':
return

@ -64,6 +64,7 @@ class CallbackModule(CallbackBase):
self._display.display("%s | FAILED! => %s" % (result._host.get_name(), self._dump_results(result._result, indent=4)), color='red')
def v2_runner_on_ok(self, result):
self._clean_results(result._result, result._task.action)
if result._task.action in C.MODULE_NO_JSON:
self._display.display(self._command_generic_msg(result._host.get_name(), result._result, "SUCCESS"), color='green')
else:

Loading…
Cancel
Save