-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rvm: Refactor away from nested vars, make defaults for system & user …
…install automatic (since Ansible does not support specific key/value overrides/Mashing like Chef, entire nested hash must be re-defined)
- Loading branch information
1 parent
4995de4
commit 02a6870
Showing
10 changed files
with
40 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
- name: installing Ruby as root | ||
command: "{{rvm.root}}/bin/rvm install {{rvm.default_ruby_version}}" | ||
command: "{{rvm_root}}/bin/rvm install {{rvm_default_ruby_version}}" | ||
sudo: true | ||
when: rvm.system_install | ||
when: "'{{ rvm_install_type }}' == 'system'" | ||
|
||
- name: installing Ruby as user | ||
command: "{{rvm.root}}/bin/rvm install {{rvm.default_ruby_version}}" | ||
command: "{{rvm_root}}/bin/rvm install {{rvm_default_ruby_version}}" | ||
sudo: false | ||
when: not rvm.system_install | ||
when: "'{{ rvm_install_type }}' == 'user'" | ||
|
||
- include: ./select_ruby.yml |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- | ||
- name: setting default Ruby version as root | ||
shell: "source {{rvm.init_script}} && rvm use {{rvm.default_ruby_version}} --default executable=/bin/bash" | ||
shell: "source {{rvm_init_script}} && rvm use {{rvm_default_ruby_version}} --default executable=/bin/bash" | ||
sudo: true | ||
register: rvm_select_ruby_version_root | ||
ignore_errors: True | ||
changed_when: False | ||
when: rvm.system_install | ||
when: "'{{ rvm_install_type }}' == 'system'" | ||
|
||
- name: setting default Ruby version as user | ||
shell: "source {{rvm.init_script}} && rvm use {{rvm.default_ruby_version}} --default executable=/bin/bash" | ||
shell: "source {{rvm_init_script}} && rvm use {{rvm_default_ruby_version}} --default executable=/bin/bash" | ||
sudo: false | ||
register: rvm_select_ruby_version_user | ||
ignore_errors: True | ||
changed_when: False | ||
when: not rvm.system_install | ||
when: "'{{ rvm_install_type }}' == 'user'" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
rvm_root: /usr/local/rvm | ||
rvm_init_script: /etc/profile.d/rvm.sh |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
rvm_root: "~/.rvm" | ||
rvm_init_script: "~/.rvm/scripts/rvm" |