# Getting attribute in Jinja2 templates

**URL:** <https://forum.ansible.com/t/getting-attribute-in-jinja2-templates/12104>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [November 26, 2012, 7:03pm UTC](https://forum.ansible.com/t/getting-attribute-in-jinja2-templates/12104 "2012-11-26T19:03:06Z")\
**Posts on this page:** 1\
**Page:** 1

<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 26, 2012, 7:03pm UTC](https://forum.ansible.com/t/getting-attribute-in-jinja2-templates/12104/1 "2012-11-26T19:03:06Z")

</div>

also FYI -- in the original post, the variable that the OP wants to  
access is "hostvars", not "hosts".
