# Question with group\_vars

**URL:** <https://forum.ansible.com/t/question-with-group-vars/15283>\
**Category:** Ansible Project\
**Created:** [May 20, 2014, 6:43pm UTC](https://forum.ansible.com/t/question-with-group-vars/15283 "2014-05-20T18:43:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_S](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sam\_S](https://forum.ansible.com/u/Sam_S)\
**Post date:** [May 20, 2014, 6:43pm UTC](https://forum.ansible.com/t/question-with-group-vars/15283/1 "2014-05-20T18:43:22Z")

</div>

In my local.yml I’m able to run the playbook and reference variables within group\_vars/all however I’m not able to access variables within group\_vars/phl-stage. Let’s assume the following.

ansible-playbook -i phl-stage site.yml

I have a variable, let’s call it “deploy\_path” that’s different for each environment. I place the variable within group\_vars/. If I include the file (group\_vars/phl-stage) within “vars\_files” it works but I would’ve thought the group file would be automatically loaded?

# cat local.yml

---

<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:** [May 21, 2014, 10:08pm UTC](https://forum.ansible.com/t/question-with-group-vars/15283/2 "2014-05-21T22:08:43Z")

</div>

You never need to include group\_vars/ variables in vars\_files – these are loaded automatically. Ditto for host\_vars/.

The paths looked at those alongside your playbook or inventory.

If you want to put them somewhere else, you can be explicit, but I would not call them “group\_vars” as that means something in ansible and might confuse anyone reading it why you had the duplication.
