# get name path of current playbook

**URL:** <https://forum.ansible.com/t/get-name-path-of-current-playbook/18379>\
**Category:** Ansible Project\
**Created:** [June 2, 2015, 12:12pm UTC](https://forum.ansible.com/t/get-name-path-of-current-playbook/18379 "2015-06-02T12:12:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Reter](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@Jeff\_Reter](https://forum.ansible.com/u/Jeff_Reter)\
**Post date:** [June 2, 2015, 12:12pm UTC](https://forum.ansible.com/t/get-name-path-of-current-playbook/18379/1 "2015-06-02T12:12:14Z")

</div>

how to get the name/path of the current playbook, beeing run

looking for something like a var:

ansible\_playbook  
ansible\_current\_playbook

---

<div class="post-metadata">

**Author:** ![Peter\_Loron](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@Peter\_Loron](https://forum.ansible.com/u/Peter_Loron)\
**Post date:** [June 2, 2015, 6:52pm UTC](https://forum.ansible.com/t/get-name-path-of-current-playbook/18379/2 "2015-06-02T18:52:59Z")

</div>

I think it is “playbook\_dir”. You can also get the path of the current role as “role\_path”.

-Pete
