# How to reference a role not located the roles directory?

**URL:** <https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [August 9, 2014, 10:33pm UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904 "2014-08-09T22:33:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weston\_Platter](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@Weston\_Platter](https://forum.ansible.com/u/Weston_Platter)\
**Post date:** [August 9, 2014, 10:33pm UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904/1 "2014-08-09T22:33:53Z")

</div>

I’m using a galaxy package that I modified. I would like to reference this modified role from a playbook. How do I declare that the roles File System location is not in the roles folder (as expected) but else where on my comptuer?

EG,

playbook located at = /Users/weston/my\_company/servers/web\_server.yml

role located at = /Users/weston/git/ansible\_rbenv\_role

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [August 10, 2014, 7:06am UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904/2 "2014-08-10T07:06:14Z")

</div>

You can use the roles\_path setting in ansible.cfg to specify where Ansible should look for roles:

[http://docs.ansible.com/intro\_configuration.html#roles-path](http://docs.ansible.com/intro_configuration.html#roles-path)

---

<div class="post-metadata">

**Author:** ![Peter\_Petrov](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Peter\_Petrov](https://forum.ansible.com/u/Peter_Petrov)\
**Post date:** [August 10, 2014, 11:52am UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904/3 "2014-08-10T11:52:14Z")

</div>

You can also just add a symlink to the actual role location inside the roles/ folder.

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [August 11, 2014, 12:35am UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904/4 "2014-08-11T00:35:55Z")

</div>

You can also specify the full path for the role name:

roles:

- { role: “/path/to/your/role” }

---

<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:** [August 11, 2014, 12:28pm UTC](https://forum.ansible.com/t/how-to-reference-a-role-not-located-the-roles-directory/15904/5 "2014-08-11T12:28:42Z")

</div>

Or a relative one!

Lots of options!
