# reading playbook vars from custom module?

**URL:** <https://forum.ansible.com/t/reading-playbook-vars-from-custom-module/31270>\
**Category:** Ansible Developer\
**Created:** [September 12, 2019, 2:06pm UTC](https://forum.ansible.com/t/reading-playbook-vars-from-custom-module/31270 "2019-09-12T14:06:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![l\_vic](https://avatars.discourse-cdn.com/v4/letter/l/e0b2c6/32.png) [@l\_vic](https://forum.ansible.com/u/l_vic)\
**Post date:** [September 12, 2019, 2:06pm UTC](https://forum.ansible.com/t/reading-playbook-vars-from-custom-module/31270/1 "2019-09-12T14:06:31Z")

</div>

Hello,  
Is there a way to read playbook vars such as:

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 12, 2019, 2:07pm UTC](https://forum.ansible.com/t/reading-playbook-vars-from-custom-module/31270/2 "2019-09-12T14:07:54Z")

</div>

Modules are run without knowledge of playbook state. For a module to have access playbook state, it must be explicitly passed by the user as module arguments to the module.
