# variable access in a template being looped using with\_items

**URL:** <https://forum.ansible.com/t/variable-access-in-a-template-being-looped-using-with-items/17090>\
**Category:** Ansible Project\
**Created:** [December 17, 2014, 3:47pm UTC](https://forum.ansible.com/t/variable-access-in-a-template-being-looped-using-with-items/17090 "2014-12-17T15:47:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Reinhard](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Post date:** [December 17, 2014, 3:47pm UTC](https://forum.ansible.com/t/variable-access-in-a-template-being-looped-using-with-items/17090/1 "2014-12-17T15:47:17Z")

</div>

Hi,

I have a playbook like:

`

---

<div class="post-metadata">

**Author:** ![Torsten\_Reinhard](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Post date:** [December 17, 2014, 4:07pm UTC](https://forum.ansible.com/t/variable-access-in-a-template-being-looped-using-with-items/17090/2 "2014-12-17T16:07:13Z")

</div>

I forgot to mention I´m using Ansible 1.6.6.

solved it now after cleaning my eyes:-)

Variables can be accessed within the template - if the spelling of the variable is correct. I missed one character in a very\_long\_variable\_name\_with\_some\_underscores - and that causes the problem.  
It 1st looked like the variable isn´t properly passed to the template.

Sorry for that,

Torsten
