rvm1-ansible icon indicating copy to clipboard operation
rvm1-ansible copied to clipboard

If running play locally, user needs to logout and log back in to get RVM in their $PATH

Open lyoshenka opened this issue 9 years ago • 2 comments

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.

lyoshenka avatar Oct 08 '15 16:10 lyoshenka

Also, any gems installed before logging out and logging back in won't be in the $PATH either.

lyoshenka avatar Oct 08 '15 16:10 lyoshenka

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.

isikyus avatar Jul 18 '23 03:07 isikyus