How to reference a role not located the roles directory?

54 views
Skip to first unread message

Weston Platter

unread,
Aug 9, 2014, 6:33:53 PM8/9/14
to ansible...@googlegroups.com
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

Trond Hindenes

unread,
Aug 10, 2014, 3:06:14 AM8/10/14
to ansible...@googlegroups.com
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

Peter Petrov

unread,
Aug 10, 2014, 7:52:14 AM8/10/14
to ansible...@googlegroups.com
You can also just add a symlink to the actual role location inside the roles/ folder.

James Cammarata

unread,
Aug 10, 2014, 8:35:59 PM8/10/14
to ansible...@googlegroups.com
You can also specify the full path for the role name:

  roles:
  - { role: "/path/to/your/role" }




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/484f8e62-a800-422d-ab69-3834870ed36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
Aug 11, 2014, 8:28:45 AM8/11/14
to ansible...@googlegroups.com
Or a relative one!

Lots of options!


Reply all
Reply to author
Forward
0 new messages