# Validate variables all at once

**URL:** <https://forum.ansible.com/t/validate-variables-all-at-once/23973>\
**Category:** Ansible Project\
**Created:** [March 14, 2017, 11:59pm UTC](https://forum.ansible.com/t/validate-variables-all-at-once/23973 "2017-03-14T23:59:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Adam](https://forum.ansible.com/u/Adam)\
**Post date:** [March 14, 2017, 11:59pm UTC](https://forum.ansible.com/t/validate-variables-all-at-once/23973/1 "2017-03-14T23:59:43Z")

</div>

Has anyone ever written a script/playbook that will validate all of the variables in a template are defined in the vars.yml file without having to fail each time a missing one is found? I’d like to figure out a way to know that my template variables are all defined in my dictionary of variables in a single execution. In other words, “give me a list of variables in my template that aren’t found in my dictionary.”

Thanks in advance!

Adam
