Ansible to output which host a task is running on

36 views
Skip to first unread message

Mumshad Mannambeth

unread,
Dec 24, 2016, 3:24:34 PM12/24/16
to Ansible Project
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

Kevin Csuka

unread,
Dec 29, 2016, 5:07:20 AM12/29/16
to Ansible Project
Callback plugin is used after a play is finished.
Good question tho. Don't know how.

Mumshad Mannambeth

unread,
Dec 31, 2016, 5:12:37 PM12/31/16
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages