Closed jgomo3 closed 6 years ago
@jgomo3 are you installing RVM as privileged or non privileged user?
In case use use a unprivileged user you should pass add the flag --user-install
like in the example in the README.
In case you use root user to install, the binaries will be install as system-wide.
It should be a non privileged user.
This is the role configuration:
roles:
- role: rvm_io.ruby
rvm1_rubies:
- ruby-2.1.3
rvm1_user: deploy
rvm_install_flags: '--auto-dotfiles --user-install'
rvm_install_path: '/home/deploy/.rvm'
So I had to add --autolibs=0
to the rvm1_ruby_install_flags
configuration value (even when I setted the rvm1_autolib_mode
configuration value to 0
) in order to avoid that pause.
Here is my final role configuration which is working now:
roles:
- role: rvm_io.ruby
rvm1_rubies:
- ruby-2.1.3
rvm1_user: deploy
rvm1_install_flags: '--auto-dotfiles --user-install'
rvm1_ruby_install_flags: '--autolibs=0'
rvm1_install_path: '/home/deploy/.rvm'
rvm1_autolib_mode: 0
@jgomo3 ok thanks for post the solution to your issue
My playbook freeze when the rvm1-ansible role tries to execute the task Install rubies.
Debugging it by printing the result of the expression
'{{ rvm1_rvm }} install {{ item.item }} {{ rvm1_ruby_install_flags }}'
, I get the command~/.rvm/bin/rvm install ruby-2.1.3
.When running that command in the to be provisioned server, after some steps it stops askin me for the user password:
Updating systemdeploy password required for 'apt-get --quiet --yes update': ..
The user deploy is the user asigned to rvm1_user in my playbook.
So I'm suspecting, the reason Ansible stops is rvm waiting for User Input with the required password. Even when the command is supposed to be non interactive.
I was thinking in a workaround where you could tell rvm there is no need to update the system. But don't know yet how.
Anyway, this is the bug report.