Fix the fact description and add a test
This commit is contained in:
18
README.md
18
README.md
@@ -57,30 +57,32 @@ You will likely want to use various ruby related commands in other roles. This r
|
||||
|
||||
Since the values are saved to `/etc/ansible/facts.d/rvm1.fact` you do not need to run this role every time you invoke your play book to have access to the facts. They will be persisted between play book runs.
|
||||
|
||||
- `rvm1_default_ruby_version`
|
||||
- `default_ruby_version`
|
||||
- The default ruby version that is selected
|
||||
|
||||
- `rvm1`
|
||||
- `rvm`
|
||||
- The path to the rvm binary
|
||||
|
||||
- `rvm1_default_wrappers`:
|
||||
- `default_wrappers`:
|
||||
- The path containing all of the wrapped ruby related binaries
|
||||
|
||||
- `rvm1_ruby`
|
||||
- `ruby`
|
||||
- The path to the ruby binary
|
||||
|
||||
- `rvm1_gem`
|
||||
- `gem`
|
||||
- The path to the gem binary
|
||||
|
||||
- `rvm1_bundle`
|
||||
- `bundle`
|
||||
- The path to the bundle binary
|
||||
|
||||
- `rvm1_rake`
|
||||
- `rake`
|
||||
- The path to the rake binary with bundle exec already applied
|
||||
|
||||
### Example
|
||||
|
||||
If you wanted to run a database migration in rails you would use `{{ rvm1_rake }} db:migrate`.
|
||||
You can access them in any play or role by prepending `ansible_local` to the value.
|
||||
|
||||
If you wanted to run a database migration in rails you would use `{{ ansible_local.rvm1.rake }} db:migrate`.
|
||||
|
||||
## Upgrading and removing old versions of ruby
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
- include: 'facts.yml
|
||||
- include: 'facts.yml'
|
||||
- include: 'rvm.yml'
|
||||
- include: 'rubies.yml'
|
||||
@@ -14,3 +14,6 @@
|
||||
|
||||
roles:
|
||||
- ansible-ruby
|
||||
|
||||
post_tasks:
|
||||
- debug: var=ansible_local.rvm1
|
||||
@@ -2,10 +2,10 @@
|
||||
rvm1_default_wrappers: '{{ rvm1_install_path }}/wrappers/default'
|
||||
rvm1_bundle: '{{ rvm1_default_wrappers }}/bundle'
|
||||
rvm1_facts: |
|
||||
rvm1_default_ruby_version='{{ rvm1_rubies | last if rvm1_rubies and rvm1_rubies is iterable else "" }}'
|
||||
rvm1='{{ rvm1_install_path }}/bin/rvm'
|
||||
rvm1_default_wrappers= '{{ rvm1_default_wrappers }}'
|
||||
rvm1_ruby='{{ rvm1_default_wrappers }}/ruby'
|
||||
rvm1_gem='{{ rvm1_default_wrappers }}/gem'
|
||||
rvm1_bundle='{{ rvm1_bundle }}'
|
||||
rvm1_rake='{{ rvm1_bundle }} exec {{ rvm1_default_wrappers }}/rake'
|
||||
default_ruby_version='{{ rvm1_rubies | last if rvm1_rubies and rvm1_rubies is iterable else "" }}'
|
||||
rvm='{{ rvm1_install_path }}/bin/rvm'
|
||||
default_wrappers= '{{ rvm1_default_wrappers }}'
|
||||
ruby='{{ rvm1_default_wrappers }}/ruby'
|
||||
gem='{{ rvm1_default_wrappers }}/gem'
|
||||
bundle='{{ rvm1_bundle }}'
|
||||
rake='{{ rvm1_bundle }} exec {{ rvm1_default_wrappers }}/rake'
|
||||
Reference in New Issue
Block a user