mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Optimize the code for the callback module (#56827)
* Optimize the code for the callback module * fix pep error * Restore incorrectly submitted code * fix pep error * fix pep error * Restore incorrectly submitted code * Restore incorrectly submitted code * fix condition * fix condition * fix pep error
This commit is contained in:
@@ -178,7 +178,7 @@ class CallbackModule(CallbackBase):
|
||||
else:
|
||||
self._clean_results(result._result, result._task.action)
|
||||
|
||||
if (self._display.verbosity > 0 or '_ansible_verbose_always' in result._result) and '_ansible_verbose_override' not in result._result:
|
||||
if self._run_is_verbose(result):
|
||||
msg += " => %s" % (self._dump_results(result._result),)
|
||||
self._display.display(msg, color=color)
|
||||
|
||||
@@ -226,7 +226,7 @@ class CallbackModule(CallbackBase):
|
||||
self._process_items(result)
|
||||
else:
|
||||
msg = "skipping: %d/%d [%s]" % (self._host_counter, self._host_total, result._host.get_name())
|
||||
if (self._display.verbosity > 0 or '_ansible_verbose_always' in result._result) and '_ansible_verbose_override' not in result._result:
|
||||
if self._run_is_verbose(result):
|
||||
msg += " => %s" % self._dump_results(result._result)
|
||||
self._display.display(msg, color=C.COLOR_SKIP)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user