8000 Unable to install for single user on a fresh machine: freezes asking for sudo password · Issue #127 · rvm/rvm1-ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unable to install for single user on a fresh machine: freezes asking for sudo password #127
Closed
@jogaco

Description

@jogaco

I'm quite familiar with rvm.

I've tried several options, as documented in README, to install rvm and ruby on a fresh Ubuntu 16.04 machine for single user, without luck.

The machine has a myuser sudoer, with disabled root login for security reasons.

The task freezes when installing rubies.

First try:

---
- name: Configure servers with ruby support for single user
  hosts: newservers

  roles:
    - { role: rvm_io.ruby,
        tags: ruby,
        rvm1_rubies: ['ruby-2.3.3'],
        rvm1_user: 'myuser',
      }

With command
ansible-playbook -i hosts.ini ruby_script1.yml --user myuser --ask-sudo-pass -v

Freezes and doing a ps at terminal I can see a task:
sudo -p %p password required for 'apt-get --quiet --yes update': apt-get --quiet --yes update

Which is rvm waiting for a password trying to install pre-requisites.

Second try:
If I try something slightly different: not disabling root login, with:

---
- name: Configure servers with ruby support for single user
  hosts: newservers

  roles:
    - { role: rvm_io.ruby,
        tags: ruby,
        rvm1_rubies: ['ruby-2.3.3'],
        rvm1_user: 'myuser',
        rvm1_install_flags: '--auto-dotfiles --user-install',
        rvm1_install_path: '/home/myuser/.rvm'
      }

With command:
ansible-playbook -i hosts.ini ruby_script2.yml --user root --ask-pass -v

Freezes again, with same password task listed.

I am quite desperate to automate this task.
Without deep knowledge of ansible, if you lunch rvm with sudo, that would certainly work, as it is working by issuing the command manually at the console:

sudo rvm install 2.3.3

Whereas if you try the command

rvm install 2.3.3

It stops and asks for password to install pre-requisites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0