Comments (13)
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.
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.
I don't think installing with root is a good idea. Check out #127
from rvm1-ansible.
by never how long do you mean? what operating system/version is this?
from rvm1-ansible.
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.
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.
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.
ah right, on Ubuntu it should not take so long, are you getting any logs?
from rvm1-ansible.
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.
@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.
@nickjj Success! But I thought I didn't need to/shouldn't include that?
from rvm1-ansible.
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.
Thanks so much 👍
Indeed the documentation could use an amendment in this regard :)
from rvm1-ansible.
Related Issues (20)
- I don't get it. HOT 2
- Installing bundler fails when using a <major>.<minor>-latest version of Ruby
- bundler conflict HOT 3
- Regression: rubies are not installed HOT 6
- Configuration of autolibs when RVM is already installed
- How to do mixed-user install with this?
- Improving installation of Bundler HOT 11
- Ansible --check mode fails on "Delete ruby if relevant" HOT 1
- Migrate to a new "Continuous Integration as a Service" Platform HOT 1
- Problem installing rubies with rvm1_user HOT 1
- Use rvm/ubuntu_rvm ppa for ubuntu distributions
- Error while evaluating conditional (not ansible_check_mode and rvm1_gpg_keys != '' and (gpg_import is not defined or gpg_import.rc != 0)): 'dict object' has no attribute 'rc'
- Deprecation warnings HOT 1
- Import GPG keys from keyservers] / ipv4.pool.sks-keyservers.net HOT 2
- Ruby 3.0.0 is not installing HOT 4
- ruby install hangs on user input HOT 12
- CI Builds are not running HOT 4
- Releases not being pulled by Ansible Galaxy HOT 16
- Install bundler if not installed - fail HOT 2
- newb documentation question HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rvm1-ansible.