1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Display task banner before showing file diff (#42573)

This commit is contained in:
Andrew Gaffney 2018-07-10 14:27:44 -05:00 committed by GitHub
parent 8e26a58443
commit 824524c67a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,6 +207,9 @@ class CallbackModule(CallbackBase):
self._display.banner(msg) self._display.banner(msg)
def v2_on_file_diff(self, result): def v2_on_file_diff(self, result):
if self._last_task_banner != result._task._uuid:
self._print_task_banner(result._task)
if result._task.loop and 'results' in result._result: if result._task.loop and 'results' in result._result:
for res in result._result['results']: for res in result._result['results']:
if 'diff' in res and res['diff'] and res.get('changed', False): if 'diff' in res and res['diff'] and res.get('changed', False):