Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user install hangs on user input #66

Closed
ruudgrosmann opened this issue Oct 21, 2015 · 4 comments
Closed

user install hangs on user input #66

ruudgrosmann opened this issue Oct 21, 2015 · 4 comments

Comments

@ruudgrosmann
Copy link

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

  • role: rvm_io.rvm1-ruby
    when: true
    sudo: yes
    rvm1_user: 'archief'
    rvm1_rvm_version: 'stable'
    rvm1_rvm_check_for_updates: false
    rvm1_gpg_keys: ''
    rvm1_rubies:
    - 'ruby-1.9.3'
    rvm1_install_flags: '--auto-dotfiles --user-install'
    rvm1_install_path: '/home/archief/.rvm'
    environment:
    http_proxy: http://172.22.7.136:8080
    https_proxy: https://172.22.7.136:80

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:

  • not running with' sudo: yes' and doing the system requirements check beforehand, using the remote user that has provided a sudo password (what commands should I run then, is the apt-get in the rvm output sufficient?)
  • a way to provide the sudo password of the rvm_user

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
Copy link

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
Copy link
Author

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
Copy link

stephanfriedrich commented Nov 5, 2017

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

@stephanfriedrich
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants