Last active
August 29, 2015 14:16
-
-
Save davejlong/d61ce76526c4691e2ff8 to your computer and use it in GitHub Desktop.
Install Ruby if not already installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Download Ruby source | |
get_url: url=https://.../ruby-{{ ruby_version }}.tar.gz dest=/tmp/ruby.tar.gz | |
tags: ruby_install | |
- name: Make tmp directory for Ruby source | |
file: path=/tmp/ruby state=directory | |
tags: ruby_install | |
... Run through the rest of the configuration ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Check current Ruby version | |
shell: ruby --version 2>/dev/null | awk '{ print $2 }' | |
register: installed_ruby_version | |
# {{ ruby_version }} comes from my group variables | |
- include_ruby.yml | |
when: installed_ruby_version.stdout.find(ruby_version) != 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment