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

TASK: [rvm_io.rvm1-ruby | Install rubies] stucks #38

Closed
evserykh opened this issue Apr 15, 2015 · 3 comments
Closed

TASK: [rvm_io.rvm1-ruby | Install rubies] stucks #38

evserykh opened this issue Apr 15, 2015 · 3 comments

Comments

@evserykh
Copy link

I have playbook:

roles:
  - role: rvm_io.rvm1-ruby
    rvm1_install_flags:       '--auto-dotfiles --user-install
    rvm1_install_path:        '/home/{{ ansible_ssh_user }}/.rvm'
    rvm1_rubies: 
      - '2.1.5'
    sudo:                     True
    rvm1_user:                'user'

I try to execute

ansible-playbook playbook.yml --ask-become-pass

and RVM log shows installation process stops and waits for password

...
...
...
++ sudo -p '%p password required for '\''apt-get --quiet --yes update'\'': ' apt-get --quiet --yes update

When I try to install ruby without

rvm1_user:                'user'

the Ruby installs fine, but TASK: [rvm_io.rvm1-ruby | Select default ruby] failed with Permission denied because ~/.rvm belongs to root

@nickjj
Copy link
Contributor

nickjj commented May 7, 2015

What happens if you set sudo_user: 'user' when you run the role?

@rafadc
Copy link

rafadc commented May 15, 2015

Same problem here in an Ubuntu machine in Digital Ocean

Doing sudo_user: 'user' made no difference.

I'm installing RVM for a user that is not sudoer but connecting with root and using sudo_user to change to that user. Then I suppose that when RVM is installed it can't change back to root to install dependencies.

The same problem happens when you make the user sudoer but he needs a password.

The task runs flawlessly for me if I before applying the role I do the following

- name: Make the user sudoer with no password
  lineinfile: "dest=/etc/sudoers state=present regexp='^%myuser' line='%myuser ALL=(ALL) NOPASSWD: ALL'"

Unfortunately I could not find any way of asking rvm about which packages it needs to install them before using root user. Also I can't think of a way to issue a warning.

Anyway this behaviour is in the docs.

Thanks a lot!

@nickjj
Copy link
Contributor

nickjj commented May 16, 2015

Ok, I'm going to close it for now. No prob, I'm glad you got things squared away for your use case.

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

No branches or pull requests

3 participants