# Ansible to output which host a task is running on

**URL:** <https://forum.ansible.com/t/ansible-to-output-which-host-a-task-is-running-on/23331>\
**Category:** Ansible Project\
**Created:** [December 24, 2016, 8:24pm UTC](https://forum.ansible.com/t/ansible-to-output-which-host-a-task-is-running-on/23331 "2016-12-24T20:24:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mumshad\_Mannambeth](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mumshad\_Mannambeth](https://forum.ansible.com/u/Mumshad_Mannambeth)\
**Post date:** [December 24, 2016, 8:24pm UTC](https://forum.ansible.com/t/ansible-to-output-which-host-a-task-is-running-on/23331/1 "2016-12-24T20:24:34Z")

</div>

Ansible prints information whenever a task starts, but doesn’t print information on which host it is running currently. is there a way to make it print this information. may be with modification to Callback plugins? I looked at v2\_playbook\_on\_task\_start call but was not able to get host information for which a task is running. Appreciate any information around here.

Thanks  
Mumshad

---

<div class="post-metadata">

**Author:** ![Kevin\_Csuka1](https://avatars.discourse-cdn.com/v4/letter/k/ecae2f/32.png) [@Kevin\_Csuka1](https://forum.ansible.com/u/Kevin_Csuka1)\
**Post date:** [December 29, 2016, 10:07am UTC](https://forum.ansible.com/t/ansible-to-output-which-host-a-task-is-running-on/23331/2 "2016-12-29T10:07:20Z")

</div>

Callback plugin is used after a play is finished.  
Good question tho. Don’t know how.

---

<div class="post-metadata">

**Author:** ![Mumshad\_Mannambeth](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mumshad\_Mannambeth](https://forum.ansible.com/u/Mumshad_Mannambeth)\
**Post date:** [December 31, 2016, 10:12pm UTC](https://forum.ansible.com/t/ansible-to-output-which-host-a-task-is-running-on/23331/3 "2016-12-31T22:12:37Z")

</div>

Hi Kevin,

We do have call backs before a play finishes. The on\_task\_start and on\_play\_start callbacks. But I can’t figure out how to know for which host a particular task is running on.

Thanks,  
Mumshad
