Change the version of rvm ruby ​​with an available book

I have a boot game that successfully installs rvm. But now I have to change the standard ruby ​​version. I tried with:

- name: Install Bundler
  command: bash -lc "rvm use 2.1.2-p95"

or

- name: use 2.1
  shell: /usr/bin/env bash -lc "rvm use 2.1.2-p95"

or

- name: use 2.1
  shell: rvm use 2.1.2-p95

But nothing like it looks like everything is working fine, but when I register ssh with the same user who uses the irreplaceable and starts rvm current, the ruby ​​version is the same.

I suspect I have ssh and bash, but I see a solution.

+4
source share
1 answer

to try:

- name: Install Bundler
  command: rvm alias create default ruby-2.1.2-p95

by the way. you saw RVM support for Ansible: https://github.com/rvm/rvm1-ansible

+6
source

All Articles