mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Display task banner before item status (#42892)
This is a follow-up to #41058
This commit is contained in:
parent
917b6b0d09
commit
42346937b1
1 changed files with 7 additions and 0 deletions
|
@ -236,6 +236,8 @@ class CallbackModule(CallbackBase):
|
|||
def v2_runner_item_on_ok(self, result):
|
||||
|
||||
if self.display_ok_hosts:
|
||||
if self._last_task_banner != result._task._uuid:
|
||||
self._print_task_banner(result._task)
|
||||
|
||||
delegated_vars = result._result.get('_ansible_delegated_vars', None)
|
||||
self._clean_results(result._result, result._task.action)
|
||||
|
@ -260,6 +262,8 @@ class CallbackModule(CallbackBase):
|
|||
self._display.display(msg, color=color)
|
||||
|
||||
def v2_runner_item_on_failed(self, result):
|
||||
if self._last_task_banner != result._task._uuid:
|
||||
self._print_task_banner(result._task)
|
||||
|
||||
delegated_vars = result._result.get('_ansible_delegated_vars', None)
|
||||
self._clean_results(result._result, result._task.action)
|
||||
|
@ -276,6 +280,9 @@ class CallbackModule(CallbackBase):
|
|||
|
||||
def v2_runner_item_on_skipped(self, result):
|
||||
if self.display_skipped_hosts:
|
||||
if self._last_task_banner != result._task._uuid:
|
||||
self._print_task_banner(result._task)
|
||||
|
||||
self._clean_results(result._result, result._task.action)
|
||||
msg = "skipping: [%s] => (item=%s) " % (result._host.get_name(), self._get_item_label(result._result))
|
||||
if (self._display.verbosity > 0 or '_ansible_verbose_always' in result._result) and '_ansible_verbose_override' not in result._result:
|
||||
|
|
Loading…
Reference in a new issue