Yvo van Beek
unread,Dec 1, 2014, 11:09:19 AM12/1/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
In my playbook I have to do a few calls on RVM.
I do these calls with the shell action by:
1) impersonating user x (sudo_user)
2) setting the shell to bash
3) setting the working directory to y
4) prefixing my shell command with "source {{rvm_script_path}} ;"
After doing 5 RVM calls this becomes a bit repetitive. For now I've put some of the arguments in a variable and use "args: {{rvm_arg}}", but I feel there must be a better way.
Should I create a module or create a role for RVM? I'm not sure if a module would reduce much of the syntax and a role seems better suited for a sequence of tasks?
Note: I know that there is a RVM role on Ansible Galaxy, but it is focussed at installing RVM, not so much on using it.