On Sat, Aug 22, 2015 at 03:15:40PM -0700, Derrick Mar wrote:
> Hey Brian. Thanks for the response. Yeah I definitely agree this is a noop.
> My question is how do I make is so that it loads RVM and ansible_env.PATH
> will include paths such as /home/ubuntu/.rvm/gems/ruby-2.2.2/wrappers. For
> example, immediately when I SSH into my EC2 instance it automatically loads
> RVM. I'd like to do the same with ansible when I ssh.
>
Hi,
the problem with this is, that you are loading your .rvm environment probably
from some kind of .profile or the login shell you are using.
When Ansible does its login into the destination server it is running in an
empty environment like a cron job.
You have to wrap your script in a wrapper script, that would enable your rvm
environment inside your task. Maybe you should reconsider using a ruby version
from rvm for system tasks, you may be trying to perform.
Greetings,
/mf
--
may you always grok in fullness