How to reference a role not located the roles directory?

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

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

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

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

roles:

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

Or a relative one!

Lots of options!