Open jumski opened 9 years ago
A response would be greatly appreciated. I am quite new to ansible and have the exact same issue with latest version of this role and ansible.
+1
I'll take a look at this and post something here ASAP.
The Ansible 'gem' task is the issue here (although I haven't tested with RVM to verify, I've bumped into the same issue elsewhere). It's actually in the docs, but by default the 'gem' task does a 'user-install', so it'll end up in whatever user the task is running as (in your case, that's root).
Change your gem task to this:
- name: install backup gem
tags: focus
gem: name=backup user_install=no version=4.2 state=present executable=/usr/local/rvm/rubies/ruby-2.0.0-p643/bin/gem
I install some ruby with this dependency:
and later on install a gem with following task:
them gem lands into
/root/.gem/ruby/2.0.0/gems/
instead of rvm's path. There is only a wrapper in/usr/local/rvm
forbackup
binary.I've tried with manually overriding environment like this:
but without any luck.
Is it even possible to use
gem_module
to install gems for rvm rubies? Or i should fallback to someshell:
withcreates:
trickery?Thanks for any help!
My versions: