Display task banner before item status (#42892)

This is a follow-up to #41058
This commit is contained in:
Andrew Gaffney 2018-07-24 12:25:28 -05:00 committed by GitHub
parent 917b6b0d09
commit 42346937b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: