# anskbile-galaxy install -r requirements/my-play-reqs.yml -p roles/ installs roles in /etc/ansible/roles instead of /path\_to\_playbooks/roles?

**URL:** <https://forum.ansible.com/t/anskbile-galaxy-install-r-requirements-my-play-reqs-yml-p-roles-installs-roles-in-etc-ansible-roles-instead-of-path-to-playbooks-roles/26166>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [November 29, 2017, 2:55pm UTC](https://forum.ansible.com/t/anskbile-galaxy-install-r-requirements-my-play-reqs-yml-p-roles-installs-roles-in-etc-ansible-roles-instead-of-path-to-playbooks-roles/26166 "2017-11-29T14:55:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [November 29, 2017, 2:55pm UTC](https://forum.ansible.com/t/anskbile-galaxy-install-r-requirements-my-play-reqs-yml-p-roles-installs-roles-in-etc-ansible-roles-instead-of-path-to-playbooks-roles/26166/1 "2017-11-29T14:55:20Z")

</div>

I have the following directory structure. The my-play-reqs.yml file contains the roles that I need for the my-play.yml playbook.

`/path_to_playbooks/my-play.yml /path_to_playbooks/requirements/my-play-reqs.yml`

…and I run the following command to install my roles

`$ cd/path_to_playbooks $ ansible-galaxy install -r requirements/my-play-reqs.yml -p roles/ --force`

…and I expect the roles to be installed /path\_to\_playbooks/roles. However, they’re installed in /etc/ansible/roles instead. The /etc/ansible/ansible.cfg file does have this line

`  
roles\_path = /etc/ansible/roles:/usr/share/ansible/roles

`

…but shouldn’t the “-p roles/” option overried that and put the roles in /path\_to\_playbooks/roles?

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [November 29, 2017, 3:22pm UTC](https://forum.ansible.com/t/anskbile-galaxy-install-r-requirements-my-play-reqs-yml-p-roles-installs-roles-in-etc-ansible-roles-instead-of-path-to-playbooks-roles/26166/2 "2017-11-29T15:22:00Z")

</div>

The [Ansible Galaxy page](http://docs.ansible.com/ansible/latest/galaxy.html#id2) at least say the “-r” or “–roles-path” option should override the roles\_path setting in ansible.cfg
