Ansible to output which host a task is running on

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

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

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