# is there a way to define a range of data?

**URL:** <https://forum.ansible.com/t/is-there-a-way-to-define-a-range-of-data/34030>\
**Category:** Ansible Developer\
**Created:** [October 14, 2020, 6:55am UTC](https://forum.ansible.com/t/is-there-a-way-to-define-a-range-of-data/34030 "2020-10-14T06:55:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lou](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@lou](https://forum.ansible.com/u/lou)\
**Post date:** [October 14, 2020, 6:55am UTC](https://forum.ansible.com/t/is-there-a-way-to-define-a-range-of-data/34030/1 "2020-10-14T06:55:33Z")

</div>

Hi Ansible experts,

Is there a way to simplify writing the following (vlan):

---

<div class="post-metadata">

**Author:** ![Sumit\_Jaiswal](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@Sumit\_Jaiswal](https://forum.ansible.com/u/Sumit_Jaiswal)\
**Post date:** [October 14, 2020, 6:59am UTC](https://forum.ansible.com/t/is-there-a-way-to-define-a-range-of-data/34030/2 "2020-10-14T06:59:05Z")

</div>

Hi Lou,

You should be able to resolve the respective use case using Ansible loop param([https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_loops.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html)).

Plz ref: [https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_loops.html#with-sequence](https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#with-sequence) as it talks about how you can imitate range functionality.

**_Regards,_**  
Sumit Jaiswal (he/him)  
Github/IRC: _justjais_

 ![](https://us1.discourse-cdn.com/ansible/original/2X/3/358bc6f14d1af82629c2f248810ffa087fb8c1f0.png)

---

<div class="post-metadata">

**Author:** ![lou](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@lou](https://forum.ansible.com/u/lou)\
**Post date:** [October 14, 2020, 3:41pm UTC](https://forum.ansible.com/t/is-there-a-way-to-define-a-range-of-data/34030/3 "2020-10-14T15:41:39Z")

</div>

Cool. Just what I needed. Thanks Sumit!
