minimal callback doesn't properly respect changed, bring into alignment with oneline (#41273)
This commit is contained in:
parent
25ab2a8153
commit
ec42797627
1 changed files with 10 additions and 6 deletions
|
@ -55,13 +55,17 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
self._handle_warnings(result._result)
|
self._handle_warnings(result._result)
|
||||||
|
|
||||||
if result._task.action in C.MODULE_NO_JSON:
|
if result._result.get('changed', False):
|
||||||
self._display.display(self._command_generic_msg(result._host.get_name(), result._result, "SUCCESS"), color=C.COLOR_OK)
|
color = C.COLOR_CHANGED
|
||||||
|
state = 'CHANGED'
|
||||||
else:
|
else:
|
||||||
if 'changed' in result._result and result._result['changed']:
|
color = C.COLOR_OK
|
||||||
self._display.display("%s | SUCCESS => %s" % (result._host.get_name(), self._dump_results(result._result, indent=4)), color=C.COLOR_CHANGED)
|
state = 'SUCCESS'
|
||||||
else:
|
|
||||||
self._display.display("%s | SUCCESS => %s" % (result._host.get_name(), self._dump_results(result._result, indent=4)), color=C.COLOR_OK)
|
if result._task.action in C.MODULE_NO_JSON:
|
||||||
|
self._display.display(self._command_generic_msg(result._host.get_name(), result._result, state), color=color)
|
||||||
|
else:
|
||||||
|
self._display.display("%s | %s => %s" % (result._host.get_name(), state, self._dump_results(result._result, indent=4)), color=color)
|
||||||
|
|
||||||
def v2_runner_on_skipped(self, result):
|
def v2_runner_on_skipped(self, result):
|
||||||
self._display.display("%s | SKIPPED" % (result._host.get_name()), color=C.COLOR_SKIP)
|
self._display.display("%s | SKIPPED" % (result._host.get_name()), color=C.COLOR_SKIP)
|
||||||
|
|
Loading…
Reference in a new issue