Expose the url for both the installer and stable rvm version number

This commit is contained in:
Nick Janetakis
2014-06-03 07:13:28 -04:00
parent 93e82613a3
commit 1152821f62
3 changed files with 17 additions and 6 deletions

View File

@@ -22,7 +22,15 @@ ruby_temp_download_path: /usr/local/src
# Where should rvm be installed to? # Where should rvm be installed to?
ruby_rvm_install_path: /usr/local/rvm 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 ruby_rvm_force_upgrade_installer: false
# If you are concerned rvm stable might not be stable then # If you are concerned rvm stable might not be stable then

View File

@@ -4,5 +4,8 @@ ruby_version: 2.1.1 # X.X.X-pXXX format
ruby_temp_download_path: /usr/local/src ruby_temp_download_path: /usr/local/src
ruby_rvm_install_path: /usr/local/rvm 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_force_upgrade_installer: false
ruby_rvm_skip_upgrade: false ruby_rvm_skip_upgrade: false

View File

@@ -12,13 +12,13 @@
register: rvm_current_version register: rvm_current_version
when: rvm_profile.stat.exists when: rvm_profile.stat.exists
- name: detect latest rvm version - name: detect stable rvm version
uri: url=https://raw.githubusercontent.com/wayneeseguin/rvm/master/VERSION return_content=yes uri: url={{ ruby_rvm_stable_version_number }} return_content=yes
register: rvm_latest_version register: rvm_stable_version_number
- name: ensure rvm installer is downloaded - name: ensure rvm installer is downloaded
get_url: get_url:
url: https://get.rvm.io url: "{{ ruby_rvm_latest_installer }}"
dest: "{{ ruby_temp_download_path }}/rvm-installer.sh" dest: "{{ ruby_temp_download_path }}/rvm-installer.sh"
when: not rvm_installer.stat.exists or ruby_rvm_force_upgrade_installer when: not rvm_installer.stat.exists or ruby_rvm_force_upgrade_installer
@@ -34,7 +34,7 @@
- name: ensure rvm is upgraded - name: ensure rvm is upgraded
shell: "{{ ruby_rvm_install_path }}/bin/rvm get stable && {{ ruby_rvm_install_path }}/bin/rvm reload" 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 - name: ensure rvm installs ruby dependencies
command: "{{ ruby_rvm_install_path }}/bin/rvm autolibs 3" command: "{{ ruby_rvm_install_path }}/bin/rvm autolibs 3"