From 818c1ccdf13d7174a99aa89427fe978ac30ca5aa Mon Sep 17 00:00:00 2001 From: Nick Janetakis Date: Fri, 18 Jul 2014 16:44:02 -0400 Subject: [PATCH] Move the example playbook under the installation section --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index b5ae81b..b0355e1 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,31 @@ rvm1-ansible solves this by using rvm to install 1 or more versions of ruby. It `$ ansible-galaxy install rvm_io.rvm1-ruby` +## Example playbook + +For the sake of this example let's assume you have a group called **app** and you have a typical `site.yml` file. + +To use this role edit your `site.yml` file to look something like this: + +``` +--- +- name: ensure app servers are configured +- hosts: app + + roles: + - { role: rvm_io.rvm1-ruby, tags: ruby } +``` + +Let's say you want to edit a few values, you can do this by opening or creating `group_vars/app.yml` which is located relative to your `inventory` directory and then making it look something like this: + +``` +--- +rvm1_rubies: + - 'ruby-2.1.0' + - 'ruby-2.1.2' +rvm1_rvm_stable_version_number: 1.25.26 +``` + ## Role variables Below is a list of default values along with a description of what they do. @@ -109,31 +134,6 @@ Just add `--extra-vars 'rvm1_delete_ruby=ruby-2.1.0'` to the end of your play bo Not having to edit anything sure sounds better to me. -## Example playbook - -For the sake of this example let's assume you have a group called **app** and you have a typical `site.yml` file. - -To use this role edit your `site.yml` file to look something like this: - -``` ---- -- name: ensure app servers are configured -- hosts: app - - roles: - - { role: rvm_io.rvm1-ruby, tags: ruby } -``` - -Let's say you want to edit a few values, you can do this by opening or creating `group_vars/app.yml` which is located relative to your `inventory` directory and then making it look something like this: - -``` ---- -rvm1_rubies: - - 'ruby-2.1.0' - - 'ruby-2.1.2' -rvm1_rvm_stable_version_number: 1.25.26 -``` - ## Requirements Tested on ubuntu 12.04 LTS but it should work on other versions that are similar.