Add time information to Ansible tasks
Updated: Oct 3, 2021
Some time you may need to know the time duration of Ansible playbook task. Here i will show how to enable the duration of task.
Before enable time duration:
# ansible-playbook -l ecom version-check.yaml -k -K -v
To enable time duration follow the below procedure. Below procedure tested on Red Hat and CentOS environment only.
# vim /etc/ansible/ansible.cfg
callback_whitelist = profile_tasks
:wq
Save and exit.
Now run the above command again and you will see the differences:
# ansible-playbook -l ecom version-check.yaml -k -K -v
That's it.
Hope this will help.
Comments