# Show all variables available in a template?

**URL:** <https://forum.ansible.com/t/show-all-variables-available-in-a-template/12111>\
**Category:** Ansible Project\
**Created:** [November 29, 2012, 8:57pm UTC](https://forum.ansible.com/t/show-all-variables-available-in-a-template/12111 "2012-11-29T20:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee\_S](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@Lee\_S](https://forum.ansible.com/u/Lee_S)\
**Post date:** [November 29, 2012, 8:57pm UTC](https://forum.ansible.com/t/show-all-variables-available-in-a-template/12111/1 "2012-11-29T20:57:11Z")

</div>

Is there a way to see a dump of of every variable available to a template? This would help a lot with debugging.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [November 29, 2012, 9:13pm UTC](https://forum.ansible.com/t/show-all-variables-available-in-a-template/12111/2 "2012-11-29T21:13:14Z")

</div>

You can template stuff out like this:

{{ hostvars["hostname"] || to\_yaml }}
