Ansible vars like "Current Playbook" "Current Task"

1,185 views
Skip to first unread message

johhue

unread,
May 29, 2016, 5:30:23 PM5/29/16
to Ansible Project
Does Ansible keep track of a "current playbook name" or "current task name" as a variable?

I want to build a custom email role which playbooks/tasks can invoke.

This email function would print out the playbook name like.

I supposed I could create this as a new variable and set it, but I was hoping it was already there under the hood somewhere.

Any ideas?

Thanks,
John


Adam Morris

unread,
May 30, 2016, 2:02:15 PM5/30/16
to Ansible Project
Reply all
Reply to author
Forward
0 new messages