accessing a fact in a template

Greetings All,
Thanks so much for creating such a fantastic configuration management
system. After working with Ansible and getting results are quickly as
I have, managing infrastructure is fun again!

I'm at a bit of a loss on how to access a fact for the ethernet
interface 1:1 (eth1:1) in a jinja template. The following gist
https://gist.github.com/3727009 has a santised facts list for one of
the hosts I'm managing. I'm trying to refer to
ansible_eth1:1.ipv4.address in a template. The relevant section in the
gist starts on line 75 and the property I'm trying to access is on
line 78. Any help on the syntax required to access that fact property
in a template would be much appreciated.

Thank you,
Ali

Since the fact name has a ":" in it, I'm guessing it doesn't make a
variable name that Jinja2 will let you access.

A workaround would be to go through hostvars:

{{ hostvars[$inventory_hostname][;ansible_eth1:1']['ipv4']['address'] }}

We probably should rename facts that have non-legal-variable names,
though this would break some existing templates, so I'm not sure I
want to.

It might be cleaner to offer a function like

lookup('fact_name') that returns
hostvars[$inventory_hostname]['fact_name'] or similar.

It would be nice if this was available to both Jinja2 and the basic templating.

I'm a bit busy at the moment, someone want to take this on, perhaps?