GithubHelp home page GithubHelp logo

Comments (13)

jogaco avatar jogaco commented on August 17, 2024 1

Fed up with manual installation, I gave this a go but got stuck with the same problem.
Ubuntu 16.10.
Task just freezes for hours.
The docs do not seem to provide an instantly working setup, or there's something I missed.

Trying this still no luck:

ansible-playbook -i hosts.ini ruby_script.yml --user myuser --ask-sudo-pass -v

---
- 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/{{ ansible_user }}/.rvm',
        sudo: yes
      }

And this is the last part of the output I am getting:

TASK [rvm_io.ruby : Detect if rubies are installed] ****************************
ok: [46.xxx.xxx.xx] => (item=ruby-2.3.3) => {"changed": false, "cmd": ["/home/myuser/.rvm/bin/rvm", "ruby-2.3.3", "do", "true"], "delta": "0:00:00.378382", "end": "2016-12-02 19:43:03.639547", "failed": false, "failed_when_result": false, "item": "ruby-2.3.3", "rc": 2, "start": "2016-12-02 19:43:03.261165", "stderr": "Ruby ruby-2.3.3 is not installed.", "stdout": "", "stdout_lines": [], "warnings": []}

TASK [rvm_io.ruby : Install rubies] ********************************************

Freezes and does not output anything else.
Until I Ctrl-C it:

^CProcess WorkerProcess-12:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
 [ERROR]: User interrupted execution

Any help would be appreciated.
The user myuser is a sudo user.

from rvm1-ansible.

chusiang avatar chusiang commented on August 17, 2024 1

I have some error of Ruby ruby-2.3.3 is not installed and freeze, but it's working with root on Ubuntu 14.04.

rvm1_install_path: '/usr/local/share/rvm'
rvm1_install_flags: '--user-install'
rvm1_user: 'root'

from rvm1-ansible.

jogaco avatar jogaco commented on August 17, 2024 1

I don't think installing with root is a good idea. Check out #127

from rvm1-ansible.

mpapis avatar mpapis commented on August 17, 2024

by never how long do you mean? what operating system/version is this?

from rvm1-ansible.

asgerb avatar asgerb commented on August 17, 2024

I've had it running for approximately 2 hours, at which point I've stopped the task. Without the --user-install flag it only takes about 5-10 minutes, so I figured there was something wrong. Is it normal for it to take so long?

I've updated the original comment with specifications.

from rvm1-ansible.

mpapis avatar mpapis commented on August 17, 2024

fresh instances of OSX will take extremely long, on slow machines like older Macs it might take few hours, lets be clear - it's Apple fault, they do not provide package manager, users have to install custom package managers which not always provide binary packages, there is no way to provide binary compatibility because every user might have different package manager and it can be installed in different paths, thank Apple or switch to Linux.

let the installer run till it finishes

from rvm1-ansible.

asgerb avatar asgerb commented on August 17, 2024

Sorry, guess I wasn't clear. I'm running the script from my Mac running OS X Yosemite. The script is running on a VPS with Ubuntu 14.04. As far as I understand your comment, it assumes I'm trying to run the script on Mac OS X?

from rvm1-ansible.

mpapis avatar mpapis commented on August 17, 2024

ah right, on Ubuntu it should not take so long, are you getting any logs?

from rvm1-ansible.

asgerb avatar asgerb commented on August 17, 2024

When I run the script with verbose flag it just hangs here:

TASK: [rvm_io.rvm1-ruby | Install rubies] ************************************* 
<***> ESTABLISH CONNECTION FOR USER: deployer
<***> REMOTE_MODULE command /home/deployer/.rvm/bin/rvm install ruby-2.1.3
<***> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/abj/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=5000', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=deployer', '-o', 'ConnectTimeout=10', '***', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867 && echo $HOME/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867'"]
<***> PUT /var/folders/lv/x6bs_vr93fn4jcj5nxrsz1f40000gn/T/tmptAE4QC TO /home/deployer/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867/command
<***> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/abj/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=5000', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=deployer', '-o', 'ConnectTimeout=10', '***', u"/bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/deployer/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867/command; rm -rf /home/deployer/.ansible/tmp/ansible-tmp-1416404457.84-66251684301867/ >/dev/null 2>&1'"]

Is there a way besides -vvvv to get some more info back from the task?

from rvm1-ansible.

nickjj avatar nickjj commented on August 17, 2024

@asgerb What happens if you set sudo: True?

Also you could try running the install ruby task manually on the machine to see if you get any feedback.

/$HOME/.rvm/bin/rvm install 2.1.3

from rvm1-ansible.

asgerb avatar asgerb commented on August 17, 2024

@nickjj Success! But I thought I didn't need to/shouldn't include that?

from rvm1-ansible.

nickjj avatar nickjj commented on August 17, 2024

Yeah, that confused me too. I didn't think rvm ever required sudo for user installs but it seems like for certain libraries it will internally make some calls with sudo when it installs ruby.

It seems like more accurate documentation will fix this issue?

from rvm1-ansible.

asgerb avatar asgerb commented on August 17, 2024

Thanks so much 👍
Indeed the documentation could use an amendment in this regard :)

from rvm1-ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.