# group\_vars - is this supported?

**URL:** <https://forum.ansible.com/t/group-vars-is-this-supported/16715>\
**Category:** Ansible Project\
**Created:** [November 6, 2014, 9:59pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715 "2014-11-06T21:59:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tennis\_Smith](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@Tennis\_Smith](https://forum.ansible.com/u/Tennis_Smith)\
**Post date:** [November 6, 2014, 9:59pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/1 "2014-11-06T21:59:08Z")

</div>

Can group\_vars have nested sub-directories? For example, can I have directories for groups “group\_one” and “group\_two” like this:

`  
group\_vars/  
all  
group\_one/  
all  
foo  
bar  
group\_two/  
all  
foo  
bar

`

Thanks,  
-T

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [November 7, 2014, 8:08am UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/2 "2014-11-07T08:08:57Z")

</div>

Yes, up to one level.

---

<div class="post-metadata">

**Author:** ![Tennis\_Smith](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@Tennis\_Smith](https://forum.ansible.com/u/Tennis_Smith)\
**Post date:** [November 7, 2014, 3:56pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/3 "2014-11-07T15:56:32Z")

</div>

Thanks for the reply.

I’m not sure what “one level” means. If I read the docs correctly, the group\_vars dir can (should?) be inside the inventory directory. If that is true, then how can one level work?

-T

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [November 7, 2014, 4:03pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/4 "2014-11-07T16:03:42Z")

</div>

One level means

group\_vars/foo.yml

or group\_vars/foo/a.yml and group\_vars/foo/b.yml

is ok

group\_vars/foo/some\_directory/a.yml

will not find the data in a.yml

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [November 7, 2014, 4:06pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/5 "2014-11-07T16:06:12Z")

</div>

> I'm not sure what "one level" means.

​I mean, for a group 'tomcat' you can have a file tomcat, OR a dirctory  
tomcat. You cannot have another directory beneath tomcat.​

> If I read the docs correctly, the group\_vars dir can (should?) be inside  
> the inventory directory. If that is true, then how can one level work?

​group\_vars should be in the inventory directory yes.​

---

<div class="post-metadata">

**Author:** ![Tennis\_Smith](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@Tennis\_Smith](https://forum.ansible.com/u/Tennis_Smith)\
**Post date:** [November 7, 2014, 4:30pm UTC](https://forum.ansible.com/t/group-vars-is-this-supported/16715/6 "2014-11-07T16:30:04Z")

</div>

Thanks, guys.  
-T
