mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-14 04:09:11 -07:00
changed the output to keep backwards compat
still shows path when verbose
This commit is contained in:
parent
fd8593d613
commit
b2a6784a9f
1 changed files with 8 additions and 8 deletions
|
@ -99,7 +99,9 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
# Record the start time of the current task
|
# Record the start time of the current task
|
||||||
self.current = task._uuid
|
self.current = task._uuid
|
||||||
self.stats[self.current] = {'time': time.time(), 'name': task.get_name(), 'path': task.get_path()}
|
self.stats[self.current] = {'time': time.time(), 'name': task.get_name()}
|
||||||
|
if self._display.verbosity >= 2:
|
||||||
|
self.stats[self.current][ 'path'] = task.get_path()
|
||||||
|
|
||||||
def v2_playbook_on_task_start(self, task, is_conditional):
|
def v2_playbook_on_task_start(self, task, is_conditional):
|
||||||
self._record_task(task)
|
self._record_task(task)
|
||||||
|
@ -131,10 +133,8 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
# Print the timings
|
# Print the timings
|
||||||
for uuid, result in results:
|
for uuid, result in results:
|
||||||
self._display.display(
|
msg = ''
|
||||||
"{0:-<70}{1:-<70}{2:->9}".format(
|
msg="{0:-<70}{1:->9}".format('{0} '.format(result['name']),' {0:.02f}s'.format(result['time']))
|
||||||
'{0} '.format(result['path']),
|
if 'path' in result:
|
||||||
'{0} '.format(result['name']),
|
msg += "\n{0:-<79}".format( '{0} '.format(result['path']))
|
||||||
' {0:.02f}s'.format(result['time']),
|
self._display.display(msg)
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue