rvm1-ansible
rvm1-ansible copied to clipboard
If running play locally, user needs to logout and log back in to get RVM in their $PATH
The easy solution is to add a message that warns about this. The better solution is to somehow set the $PATH correctly for the current user.
Also, any gems installed before logging out and logging back in won't be in the $PATH either.
The better solution is to somehow set the $PATH correctly for the current user.
I'm not sure this is possible. If you run ansible <some playbook that uses RVM>
in a shell, Ansible runs as a subprocess of the shell; any environment variables it sets get set only for it and its children. As far as I know there's no way in Linux to reach up from a subprocess and set variables in a parent process.
If there is a way I suspect it'd be quite complex.