Announcing Ansible-Trace: understand task duration and playbook critical paths

Hi there,

I have some slow Ansible playbooks, and I was wondering where the time goes. So I made a Callback Plugin that outputs Chrome’s “Trace Event Format” for visualising the parallel execution and critical path in https://ui.perfetto.dev/. I hope this will be generally useful, so I’m sharing it.

Pictures are worth 1000 words, so here’s a playbook executing with strategy: free:

Here’s the same playbook executing with the default strategy: linear:

Please try ansible-trace. It can help you understand your playbook and where to optimise. Please reply with your feedback if you find it useful, or find it could be improved.

Instructions are on GitHub - mhansen/ansible-trace: Visualise Ansible execution time across playbooks, tasks, and hosts..

I’d like to contribute this to Ansible core, if there is interest.

Thanks,
Mark

Very cool thanks for sharing.

If anyone else is interested, there’s a loads of good discussion happening in https://www.reddit.com/r/ansible/comments/q49h2d/ansibletrace_visualise_execution_time_of_ansible/

Kind regards,
John “gundalow” Barker
Manager, Ansible Community
Red Hat