# ip aliases inside a template

**URL:** <https://forum.ansible.com/t/ip-aliases-inside-a-template/12189>\
**Category:** Ansible Project\
**Created:** [January 8, 2013, 5:33pm UTC](https://forum.ansible.com/t/ip-aliases-inside-a-template/12189 "2013-01-08T17:33:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomdymond](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tomdymond](https://forum.ansible.com/u/tomdymond)\
**Post date:** [January 8, 2013, 5:33pm UTC](https://forum.ansible.com/t/ip-aliases-inside-a-template/12189/1 "2013-01-08T17:33:04Z")

</div>

Hi,

I fixed this by using:

hostvars[inventory\_hostname][‘ansible\_bond1:0’][‘ipv4’][‘address’]

Cheers

Tom

---

<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:** [March 30, 2013, 1:30am UTC](https://forum.ansible.com/t/ip-aliases-inside-a-template/12189/2 "2013-03-30T01:30:08Z")

</div>

Things inside {{ }} are more or less Python syntax.

Note that I am going to rectify the split by allowing {{ }} in some  
form in 1.2 main playbooks.

anyway, do not expect dot notation to work like that in Jinja2 templates.
