# 'range is undefined'

**URL:** <https://forum.ansible.com/t/range-is-undefined/12142>\
**Category:** Ansible Project\
**Created:** [December 17, 2012, 8:05pm UTC](https://forum.ansible.com/t/range-is-undefined/12142 "2012-12-17T20:05:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Thampi](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Arun\_Thampi](https://forum.ansible.com/u/Arun_Thampi)\
**Post date:** [December 17, 2012, 8:05pm UTC](https://forum.ansible.com/t/range-is-undefined/12142/1 "2012-12-17T20:05:21Z")

</div>

Hi there - I’m trying to use the range keyword in a Jinja2 template in ansible 0.9, and I get this error message: ‘range is undefined’

I’m using ansible 0.9 on Python 2.7.3 with the Jinja2 package version /usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg

The snippet I’m trying to use is:

{% for i in range(244, 254) %}

auto br-lxc-{{ i }}  
iface br-lxc-{{ i }} inet static

{% endfor %}

Any pointers will be much appreciated!

Cheers  
Arun

---

<div class="post-metadata">

**Author:** ![Rodney\_Quillo](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@Rodney\_Quillo](https://forum.ansible.com/u/Rodney_Quillo)\
**Post date:** [December 19, 2012, 8:53am UTC](https://forum.ansible.com/t/range-is-undefined/12142/2 "2012-12-19T08:53:40Z")

</div>

This is fixed on the devel branch.  
Just currently by daniel\_hozac.

---

<div class="post-metadata">

**Author:** ![Arun\_Thampi](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Arun\_Thampi](https://forum.ansible.com/u/Arun_Thampi)\
**Post date:** [December 19, 2012, 10:30am UTC](https://forum.ansible.com/t/range-is-undefined/12142/3 "2012-12-19T10:30:46Z")

</div>

Thanks Rodney!
