# How to use vars\_files in template

**URL:** <https://forum.ansible.com/t/how-to-use-vars-files-in-template/31300>\
**Category:** AWX Project\
**Created:** [September 17, 2019, 4:47pm UTC](https://forum.ansible.com/t/how-to-use-vars-files-in-template/31300 "2019-09-17T16:47:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Iyer](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Prashant\_Iyer](https://forum.ansible.com/u/Prashant_Iyer)\
**Post date:** [September 17, 2019, 4:47pm UTC](https://forum.ansible.com/t/how-to-use-vars-files-in-template/31300/1 "2019-09-17T16:47:23Z")

</div>

Hi,

My template has a number of vars\_files. I’m using GIT repo for my project.  
How will this template playbook read info from the included vars\_files ? Any explanation is appreciated.

Regards,  
Prash

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [September 17, 2019, 5:04pm UTC](https://forum.ansible.com/t/how-to-use-vars-files-in-template/31300/2 "2019-09-17T17:04:24Z")

</div>

I use the include\_vars module in my play to read relative to from the location of where the playbook sits. So say I have my main playbook sitting in the root of a project and I have my somevars.yml in my vars directory in the project

Could look like this :

- name: example  
include\_vars: vars/somevars.yml

As a play in playbook.

– You received this message because you are subscribed to the Google Groups “AWX Project” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To view this discussion on the web visit .
