# loop and pass variables from vars\_files to task command

**URL:** <https://forum.ansible.com/t/loop-and-pass-variables-from-vars-files-to-task-command/32007>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [January 20, 2020, 5:25pm UTC](https://forum.ansible.com/t/loop-and-pass-variables-from-vars-files-to-task-command/32007 "2020-01-20T17:25:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [January 20, 2020, 5:25pm UTC](https://forum.ansible.com/t/loop-and-pass-variables-from-vars-files-to-task-command/32007/1 "2020-01-20T17:25:14Z")

</div>

This (formatting mess, you should post plain text) is not a correct variable file.  
What you have here is a list, but this list need to but assigned to a variable for it to be used.
