Expose the url for both the installer and stable rvm version number
This commit is contained in:
10
README.md
10
README.md
@@ -22,7 +22,15 @@ ruby_temp_download_path: /usr/local/src
|
||||
# Where should rvm be installed to?
|
||||
ruby_rvm_install_path: /usr/local/rvm
|
||||
|
||||
# Force upgrade the rvm-installer to the latest stable version.
|
||||
# Which url or local path contains the rvm-installer script?
|
||||
# If you use a url, it must include http:// or https:// at the start.
|
||||
ruby_rvm_latest_installer: https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer
|
||||
|
||||
# Which url or local path contains the stable version number of rvm?
|
||||
# If you use a url, it must include http:// or https:// at the start.
|
||||
ruby_rvm_stable_version_number: https://raw.githubusercontent.com/wayneeseguin/rvm/master/VERSION
|
||||
|
||||
# Force upgrade the rvm-installer to the latest installer.
|
||||
ruby_rvm_force_upgrade_installer: false
|
||||
|
||||
# If you are concerned rvm stable might not be stable then
|
||||
|
||||
@@ -4,5 +4,8 @@ ruby_version: 2.1.1 # X.X.X-pXXX format
|
||||
ruby_temp_download_path: /usr/local/src
|
||||
ruby_rvm_install_path: /usr/local/rvm
|
||||
|
||||
ruby_rvm_latest_installer: https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer
|
||||
ruby_rvm_stable_version_number: https://raw.githubusercontent.com/wayneeseguin/rvm/master/VERSION
|
||||
|
||||
ruby_rvm_force_upgrade_installer: false
|
||||
ruby_rvm_skip_upgrade: false
|
||||
@@ -12,13 +12,13 @@
|
||||
register: rvm_current_version
|
||||
when: rvm_profile.stat.exists
|
||||
|
||||
- name: detect latest rvm version
|
||||
uri: url=https://raw.githubusercontent.com/wayneeseguin/rvm/master/VERSION return_content=yes
|
||||
register: rvm_latest_version
|
||||
- name: detect stable rvm version
|
||||
uri: url={{ ruby_rvm_stable_version_number }} return_content=yes
|
||||
register: rvm_stable_version_number
|
||||
|
||||
- name: ensure rvm installer is downloaded
|
||||
get_url:
|
||||
url: https://get.rvm.io
|
||||
url: "{{ ruby_rvm_latest_installer }}"
|
||||
dest: "{{ ruby_temp_download_path }}/rvm-installer.sh"
|
||||
when: not rvm_installer.stat.exists or ruby_rvm_force_upgrade_installer
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
- name: ensure rvm is upgraded
|
||||
shell: "{{ ruby_rvm_install_path }}/bin/rvm get stable && {{ ruby_rvm_install_path }}/bin/rvm reload"
|
||||
when: not rvm_latest_version.content[:-1] in rvm_current_version.stdout and rvm_profile.stat.exists and not ruby_rvm_skip_upgrade
|
||||
when: not rvm_stable_version_number.content[:-1] in rvm_current_version.stdout and rvm_profile.stat.exists and not ruby_rvm_skip_upgrade
|
||||
|
||||
- name: ensure rvm installs ruby dependencies
|
||||
command: "{{ ruby_rvm_install_path }}/bin/rvm autolibs 3"
|
||||
|
||||
Reference in New Issue
Block a user