Giter Club home page Giter Club logo

ansible-rbenv-playbook's Introduction

Ruby/Rbenv with Ansible

NOTE: this stuff is deprecated

Take a look at erasme.rbenv instead.

This playbok demonstrates (ab)using roles to install several ruby versions via rbenv.

Pre-requisites

"Quick" start

vagrant up
ansible-playbook -i hosts ruby.yml
ansible all -i hosts -m command -a 'bash -lc "rbenv versions"' -u vagrant 

Vagrant

A Vagrantfile is provided for testing purposes. It will create two VMs, and provision them with ansible.

vagrant up

If you encounter this error :

fatal: [ruby1] => {'msg': "FAILED: (25, 'Inappropriate ioctl for device')", 'failed': True}

get a newer vagrant version (1.3.5+) or issue :

export ANSIBLE_HOST_KEY_CHECKING=false

before redoing a vagrant up.

The playbook

ansible-playbook -i hosts ruby.yml

will make your computer fans scream and cores smoke. Eventually, it will install MRI 2.1.0 and 2.0.0-p353 on both hosts with 2.0.0-p353 being the default Ruby on ruby0, and 2.1.0 on ruby1.

You can check what happened with :

ansible all -i hosts -m command -a 'bash -lc "rbenv versions"' -u vagrant

Thanks

Thanks to Ansible's Google Groups fellows for their help on this, and especially Jerome Wagner for the role prereq trick. Hack away, send PRs !

ansible-rbenv-playbook's People

Contributors

leucos avatar miagao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-rbenv-playbook's Issues

Refactor roles and isolate ruby-install

There is no need to run all those tasks n times.
Installing rbenv once is ok, installing prereqs is is ok, no need to have all this in the loop.
Move out eveything but ruby-install from the loop.

bash: rbenv: command not found

Hey, trying to use this role and getting to the step TASK: [rbenv-ruby | Installs ruby] and failing with the following error:

failed: [178.62.114.246] => {"ansible_job_id": "763143692762.11188", "changed": true, "cmd": "cd; bash -lc \"MAKEOPTS= CONFIGURE_OPTS=--disable-install-rdoc rbenv install 2.1.5\"", "delta": "0:00:00.020467", "end": "2015-01-01 17:07:01.720530", "finished": 1, "rc": 127, "start": "2015-01-01 17:07:01.700063"}
stderr: bash: rbenv: command not found
<job 763143692762.11188> FAILED on 178.62.114.246

FATAL: all hosts have already failed -- aborting

Any ideas what’s up?

I’m running ansible version 1.7.1 on Mac OSX Yosemite. I’m trying to run this against a Ubuntu 14.04 x64 server on digital ocean. Please let me know if you need any more info about my environment.

I am running the command ansible-playbook -i hosts rails_deploy.yml

This Gist will show you my configuration and that I am SSHing to the box with sudo and a user named 'deploy' which is also the ssh user the rbenv commands are run as.

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.