# ansible -- vars\_files directory

**URL:** <https://forum.ansible.com/t/ansible-vars-files-directory/18435>\
**Category:** Ansible Project\
**Created:** [June 8, 2015, 6:39pm UTC](https://forum.ansible.com/t/ansible-vars-files-directory/18435 "2015-06-08T18:39:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gonzalo\_Fernandez](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Gonzalo\_Fernandez](https://forum.ansible.com/u/Gonzalo_Fernandez)\
**Post date:** [June 8, 2015, 6:39pm UTC](https://forum.ansible.com/t/ansible-vars-files-directory/18435/1 "2015-06-08T18:39:55Z")

</div>

Hi

I am writing a playbook which looks like the following:

- name: test

hosts: 127.0.0.1

connection: local

gather\_facts: yes

vars\_files:

- vars/directory/file.yml

roles:

I wonder if there is anyway of defining a “vars\_files” with JUST a directory so it will read all the files within the directory rather than defining one by one?

I would like to get this as dynamic as I could so I wonder if this is possible?

ideas/tips please?

Thanks!
