mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Revert "Revert "Merge pull request #387 from ansiblejunky/fix-callback-output""
This reverts commit 3a085b0b10.
This commit is contained in:
parent
9df5aac2a5
commit
57be05289c
4 changed files with 14 additions and 3 deletions
3
changelogs/fragments/387_callback_output_header.yml
Normal file
3
changelogs/fragments/387_callback_output_header.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- callback plugins - Add recap information to timer, profile_roles and profile_tasks callback outputs (https://github.com/ansible-collections/ansible.posix/pull/387).
|
||||||
|
|
@ -128,7 +128,10 @@ class CallbackModule(CallbackBase):
|
||||||
self._display_tasktime()
|
self._display_tasktime()
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
def playbook_on_stats(self, stats):
|
||||||
self._display_tasktime()
|
# Align summary report header with other callback plugin summary
|
||||||
|
self._display.banner("ROLES RECAP")
|
||||||
|
|
||||||
|
self._display.display(tasktime())
|
||||||
self._display.display(filled("", fchar="="))
|
self._display.display(filled("", fchar="="))
|
||||||
|
|
||||||
timestamp(self)
|
timestamp(self)
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,10 @@ class CallbackModule(CallbackBase):
|
||||||
self._display_tasktime()
|
self._display_tasktime()
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
def playbook_on_stats(self, stats):
|
||||||
self._display_tasktime()
|
# Align summary report header with other callback plugin summary
|
||||||
|
self._display.banner("TASKS RECAP")
|
||||||
|
|
||||||
|
self._display.display(tasktime())
|
||||||
self._display.display(filled("", fchar="="))
|
self._display.display(filled("", fchar="="))
|
||||||
|
|
||||||
timestamp(self)
|
timestamp(self)
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,6 @@ class CallbackModule(CallbackBase):
|
||||||
def v2_playbook_on_stats(self, stats):
|
def v2_playbook_on_stats(self, stats):
|
||||||
end_time = datetime.utcnow()
|
end_time = datetime.utcnow()
|
||||||
runtime = end_time - self.start_time
|
runtime = end_time - self.start_time
|
||||||
self._display.display("Playbook run took %s days, %s hours, %s minutes, %s seconds" % (self.days_hours_minutes_seconds(runtime)))
|
# Align summary report header with other callback plugin summary
|
||||||
|
self._display.banner("PLAYBOOK RECAP")
|
||||||
|
self._display.display("Playbook run took %s days, %s hours, %s minutes, %s seconds\n\r" % (self.days_hours_minutes_seconds(runtime)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue