# Ansible and where it looks for the host\_vars directory

**URL:** <https://forum.ansible.com/t/ansible-and-where-it-looks-for-the-host-vars-directory/14412>\
**Category:** Ansible Project\
**Created:** [January 23, 2014, 10:03pm UTC](https://forum.ansible.com/t/ansible-and-where-it-looks-for-the-host-vars-directory/14412 "2014-01-23T22:03:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gonzalo\_Servat](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Gonzalo\_Servat](https://forum.ansible.com/u/Gonzalo_Servat)\
**Post date:** [January 23, 2014, 10:03pm UTC](https://forum.ansible.com/t/ansible-and-where-it-looks-for-the-host-vars-directory/14412/1 "2014-01-23T22:03:46Z")

</div>

Hi All,

I’ve done a strace of ansible and ansible-playbook and noticed that “ansible” will look at the ‘host\_vars’ directory relative to the inventory script path, and “ansible-playbook” will look at that **plus** the ‘host\_vars’ directory relative to the path where the playbook lives.

Is there a way to specify a root directory where ansible and ansible-playbook will both look for the {host,group}\_vars directories?

- GS

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [January 23, 2014, 10:09pm UTC](https://forum.ansible.com/t/ansible-and-where-it-looks-for-the-host-vars-directory/14412/2 "2014-01-23T22:09:41Z")

</div>

Nope.

It’s relative to inventory because it’s a property of inventory.

(What you are proposing would add a third location)

---

<div class="post-metadata">

**Author:** ![Gonzalo\_Servat](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Gonzalo\_Servat](https://forum.ansible.com/u/Gonzalo_Servat)\
**Post date:** [January 23, 2014, 10:19pm UTC](https://forum.ansible.com/t/ansible-and-where-it-looks-for-the-host-vars-directory/14412/3 "2014-01-23T22:19:00Z")

</div>

Yeah, fair enough. I guess I’ll just move host\_vars and group\_vars into the inventory directory.

Thanks 🙂  
GS
