# Built-in variable that stores playbook name?

**URL:** <https://forum.ansible.com/t/built-in-variable-that-stores-playbook-name/25262>\
**Category:** Ansible Project\
**Created:** [August 15, 2017, 6:56pm UTC](https://forum.ansible.com/t/built-in-variable-that-stores-playbook-name/25262 "2017-08-15T18:56:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan1](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@Ryan1](https://forum.ansible.com/u/Ryan1)\
**Post date:** [August 15, 2017, 6:56pm UTC](https://forum.ansible.com/t/built-in-variable-that-stores-playbook-name/25262/1 "2017-08-15T18:56:51Z")

</div>

I am creating log files where I use the playbook name in the name of the log file. I am just hard coding the name into the playbooks, but I was wondering if there was a built-in variable that stores “test” if the playbook called was test.yml. Sort of like how “basename $0” or “${0##\*/}” works in bash.
