rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

user install hangs on user input #66

Closed ruudgrosmann closed 6 years ago

ruudgrosmann commented 9 years ago

hello, I try to use the ansible role rvm_io.rvm1-ruby to install rvm for a certain user.

When doing 'install rubies' it hangs. When I run it manually, it appears it is waiting for the sudo password:

archief@ubtest:~$ rvm install 1.9.3 Searching for binary rubies, this might take some time. Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/14.04/x86_64/ruby-1.9.3-p551.tar.bz2 Checking requirements for ubuntu. Installing requirements for ubuntu. Updating systemarchief password required for 'apt-get --quiet --yes update': ..- archief@ubtest:~$

I'd rather not make this user a sudoer without password, so I hope there is an alternative. This could be:

Another thing that troubled me is that the command initially really did nothing because of the fact the https-proxy had to be set. In the above example, the environment setting did nothing: the variable was not visible in the user shell. I worked around it by writing a .curlrc with the proxy setting first, but that only works with curl; I don't know if other processes need that proxy setting too. If so, is there a way to supply the ansible role with that system variable, similar to my try in the example above?

regards, ruud

kraft001 commented 8 years ago

Related to the issue #38 , but they only suggest making the sudoer passwordless I have the same issue and the same concerns, still looking for an answer

ruudgrosmann commented 8 years ago

My workaround was to do the system requirements check beforehand, so that this update (withh apt-get) will not be executed by the rvm-user, but rather by the user that has sudo rights (and with the password provided by typing it in). Once the rvm user does not need the sudo right to do the apt-get, everything work just fine. I think this should be better handled by the rvm-ansible role itself, but as long as this is not the case, I prefer the explicit system requirements install in the playbook before starting the rvm-ansible role.

hope it helps, Ruud

stephanfriedrich commented 7 years ago

@wayneeseguin @sikachu @johnivanoff i also got this issue, today. what is the best workaround for these issue ?!

stephanfriedrich commented 7 years ago

ok i see, there is an option to disable Automatic dependencies installation.

take a look at rvm1-ansible README:

# autolib mode, see https://rvm.io/rvm/autolibs
rvm1_autolib_mode: 3