# Group\_vars behavior when using directory for inventory and playbooks structured in playbooks folder

**URL:** <https://forum.ansible.com/t/group-vars-behavior-when-using-directory-for-inventory-and-playbooks-structured-in-playbooks-folder/34169>\
**Category:** Ansible Project\
**Created:** [November 9, 2020, 10:42am UTC](https://forum.ansible.com/t/group-vars-behavior-when-using-directory-for-inventory-and-playbooks-structured-in-playbooks-folder/34169 "2020-11-09T10:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dorin\_RuV](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@Dorin\_RuV](https://forum.ansible.com/u/Dorin_RuV)\
**Post date:** [November 9, 2020, 10:42am UTC](https://forum.ansible.com/t/group-vars-behavior-when-using-directory-for-inventory-and-playbooks-structured-in-playbooks-folder/34169/1 "2020-11-09T10:42:40Z")

</div>

Hi all,

I would like to have the following project structure:

_._  
_├── group\_vars_  
_│ └── all.yml_  
_├── hosts_  
_│ └── localhost_  
_└── playbooks_

_└── main.yml_

The problem here is that the group\_vars are not loaded in this configuration, they would need to be moved either under the ‘hosts’ inventory directory or under the playbooks directory.  
Is there any way to make the above structure work?

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [November 9, 2020, 11:15am UTC](https://forum.ansible.com/t/group-vars-behavior-when-using-directory-for-inventory-and-playbooks-structured-in-playbooks-folder/34169/2 "2020-11-09T11:15:10Z")

</div>

No. It is not. See "Organizing host and group variables"  
[https://docs.ansible.com/ansible/latest/user\_guide/intro\_inventory.html#organizing-host-and-group-variables](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#organizing-host-and-group-variables)

&nbsp;&nbsp;"Ansible loads host and group variable files by searching paths  
&nbsp;&nbsp;relative to the inventory file or the playbook file."

IMHO, the simplest workaround would be a symlink.
