# Require variables to exist or fail

**URL:** <https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366>\
**Category:** Ansible Project\
**Created:** [August 26, 2013, 7:30pm UTC](https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366 "2013-08-26T19:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kavin\_Kankeshwar](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@Kavin\_Kankeshwar](https://forum.ansible.com/u/Kavin_Kankeshwar)\
**Post date:** [August 26, 2013, 7:30pm UTC](https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366/1 "2013-08-26T19:30:00Z")

</div>

I vaguely remember reading about conversation of requiring an input variable to exist , if it does not exist. Playbook should exit.

Please can someone point me to the documentation . (or maybe i was just dreaming about this feature existing) 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 26, 2013, 7:46pm UTC](https://forum.ansible.com/t/require-variables-to-exist-or-fail/13366/2 "2013-08-26T19:46:12Z")

</div>

If you want to do this generically, look at examples/ansible.cfg in github for the configuration parameter to use.

Requires Ansible 1.3.

There is also a {{ foo | mandatory }} for specific variables.
