jlafon / ansible-profile

An Ansible plugin for timing tasks
http://jlafon.io/ansible-profiling.html
MIT License
342 stars 57 forks source link

Followed the instructions but nothing is printed at the end #12

Closed ghost closed 8 years ago

ghost commented 8 years ago

this is my folder -rw-rw-r-- 1 user staff 1.8K Nov 11 00:32 callback_plugins/profile_tasks.py -rw-r--r-- 1 user staff 1.3K Nov 11 00:02 preflight.yml

I run preflight but the callbacks are not executed and nothing is printed at the end of the task.

franckbrunet commented 8 years ago

+1 here

jlafon commented 8 years ago

What version of ansible were you using?

ghost commented 8 years ago

2.0

andrey-gr commented 8 years ago

In case someone ends up here. With version 2.0 there is example of such callback over here https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/profile_tasks.py

in order to enable it You need to copy it callback_plugins folder and add following line to ansible.cfg callback_whitelist = profile_tasks

hamx0r commented 8 years ago

I'm confirming @andrey-gr 's fix worked for me too. Ansible 2.0.0.1. Thanks andrey!

emeraldjava commented 8 years ago

Nice plugin but I'd suggest that @andrey-gr suggestion about the cfg file is added to the README file.

jlafon commented 8 years ago

Updated the read me. Thanks @andrey-gr .