# Loop through variables in file

**URL:** <https://forum.ansible.com/t/loop-through-variables-in-file/37185>\
**Category:** Ansible Project\
**Created:** [October 6, 2022, 4:14pm UTC](https://forum.ansible.com/t/loop-through-variables-in-file/37185 "2022-10-06T16:14:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessandro\_Sepiacci](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Alessandro\_Sepiacci](https://forum.ansible.com/u/Alessandro_Sepiacci)\
**Post date:** [October 6, 2022, 4:14pm UTC](https://forum.ansible.com/t/loop-through-variables-in-file/37185/1 "2022-10-06T16:14:24Z")

</div>

Hi,

I know how to loop through a variable list inside the playbook but how can I loop through a variable list included in a file?

Thanks.

Alessandro

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 6, 2022, 4:44pm UTC](https://forum.ansible.com/t/loop-through-variables-in-file/37185/2 "2022-10-06T16:44:49Z")

</div>

there is no difference, a variable list is still the same no matter  
how you added it.
