Skip to content

Instantly share code, notes, and snippets.

  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save r3nya/6919935 to your computer and use it in GitHub Desktop.
---
- name: install rb-installer
action: shell curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
- name: update PATH in ~/.bash_profile for rb-env
action: lineinfile dest=/home/$user/.bash_profile line=export\ PATH="$HOME/.rbenv/bin:$PATH" regexp=PATH.*rbenv
- name: add rb-env init to ~/.bash_profile
action: lineinfile dest=/home/$user/.bash_profile line='eval "$(rbenv init -)"' regexp=eval.*rbenv
- name: install ruby
action: shell /home/$user/.rbenv/bin/rbenv install $ruby_version creates=/home/$user/.rbenv/shims/ruby
- name: make ruby global
action: shell /home/$user/.rbenv/bin/rbenv global $ruby_version
- name: bootstrap any missing packages
action: shell /home/$user/.rbenv/bin/rbenv bootstrap-ubuntu-12-04
- name: bootstrap rbenv
action: shell /home/$user/.rbenv/bin/rbenv bootstrap
- name: install passenger
action: shell PATH=/home/$user/.rbenv/bin:$PATH /home/$user/.rbenv/shims/gem install passenger creates=/home/$user/.rbenv/shims/passenger
- name: initialize rbenv
action: shell bash /home/$user/.bash_profile
- name: install passenger apache2 module
action: shell PATH=/home/$user/.rbenv/bin:$PATH /home/$user/.rbenv/shims/passenger-install-apache2-module --auto creates=/home/$user/.rbenv/versions/$ruby_version/lib/ruby/gems/1.9.1/gems/passenger-$passenger_version/ext/apache2/mod_passenger.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment