# question about group\_vars

**URL:** <https://forum.ansible.com/t/question-about-group-vars/12719>\
**Category:** Ansible Project\
**Created:** [April 25, 2013, 6:30am UTC](https://forum.ansible.com/t/question-about-group-vars/12719 "2013-04-25T06:30:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [April 25, 2013, 6:30am UTC](https://forum.ansible.com/t/question-about-group-vars/12719/1 "2013-04-25T06:30:59Z")

</div>

I've been busy and out of the loop, looking through the documentation I see a lot of new functionalities have been added to ansible!

The one I am most exited about is the group\_vars, we have already implemented something similar through a bunch of includes, but this makes it much simpler, but have questions about it. Assuming this host file:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# host file  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[postgres\_master]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;damaster

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[postgres\_slave]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;daslave

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[postgres:children]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;postgres\_master  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;postgres\_slave

Do I just create this structure:  
group\_vars/postgres  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/postgres\_master  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/postgres\_slave

Will "damaster" load variables from both group\_vars/postgres and group\_vars/postgres\_master?

Can I add the .yml or .yaml extension to the group\_vars files, or do they need to be extension-less (some editor only do syntax highlighting when the right extension is there)?

Thanks.

---

<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:** [April 25, 2013, 7:02am UTC](https://forum.ansible.com/t/question-about-group-vars/12719/2 "2013-04-25T07:02:08Z")

</div>

Hi Yves,
