Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Last active August 29, 2015 14:07
Show Gist options
  • Save ku1ik/0f7433ee54af14d9fa3c to your computer and use it in GitHub Desktop.
Save ku1ik/0f7433ee54af14d9fa3c to your computer and use it in GitHub Desktop.
Installing Ruby 2.1 on Ubuntu 14.04 with ansible
Install ansible on your laptop, then:
ansible-playbook -i production site.yml
After running this confirm ruby version on the server:
ubuntu@srv-blah:~$ which ruby
/usr/bin/ruby
ubuntu@srv-blah:~$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu]
your.box.hostname.com
---
- hosts: all
remote_user: ubuntu
sudo: true
tasks:
- name: add brightbox ruby repository
apt_repository: repo='ppa:brightbox/ruby-ng'
- name: install ruby 2.1
apt: pkg=ruby2.1 state=present
- name: install ruby 2.1 dev headers
apt: pkg=ruby2.1-dev state=present
- name: install bundler
gem: name=bundler state=present user_install=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment