Ansible virtual_ruby.yml used in the blog post http://ihassin.wordpress.com/2013/12/15/from-zero-to-deployment-vagrant-ansible-rvm-and-capistrano-to-deploy-your-rails-apps-to-digitalocean-automatically/
- hosts: webservers | |
user: vagrant | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: Download ruby | |
get_url: "url={{ruby_url}} dest={{ruby_dir}}/ruby-{{ project_ruby }}.tar" | |
- name: Extract ruby | |
command: tar -zxf "{{ruby_dir}}/ruby-{{project_ruby}}.tar" | |
- name: Make, configure, and install ruby | |
command: "{{item}} chdir={{ruby_dir}}/ruby-{{project_ruby}}" | |
with_items: | |
- ./configure | |
- make | |
- sudo make install | |
- name: Install bundler | |
command: "sudo gem install bundler" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment