# site.yml file location and roles

**URL:** <https://forum.ansible.com/t/site-yml-file-location-and-roles/16514>\
**Category:** Ansible Project\
**Created:** [October 15, 2014, 7:56am UTC](https://forum.ansible.com/t/site-yml-file-location-and-roles/16514 "2014-10-15T07:56:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Laird](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Daniel\_Laird](https://forum.ansible.com/u/Daniel_Laird)\
**Post date:** [October 15, 2014, 7:56am UTC](https://forum.ansible.com/t/site-yml-file-location-and-roles/16514/1 "2014-10-15T07:56:12Z")

</div>

All,

Is it possible to have the site.yml file and hosts file in a subdirectory like this:

root/  
group\_vars/  
roles

…  
sites/  
office\_name/  
hosts  
site.yml

When I tried to do this with ansible-playbook sites/office\_name/hosts -i sites/office\_name/site.yml  
I got an error message about being unable to find roles.

Do I need to change the roles\_path setting - or is this not possible.  
The reason is for a shared project with multiple sites and I dont want everything at the top level.

Cheers  
Dan

---

<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:** [October 20, 2014, 9:19pm UTC](https://forum.ansible.com/t/site-yml-file-location-and-roles/16514/2 "2014-10-20T21:19:11Z")

</div>

Read the documentation about setting the roles path in ansible.cfg or via environment variables.

It doesn’t know how to climb up and find your roles, basically.
