Fix a bug with how the upgrade task checked for rvm
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: detect rvm profile
|
- name: detect rvm binary
|
||||||
stat: path=/etc/profile.d/rvm.sh
|
stat: path={{ ruby_rvm_install_path }}/bin/rvm
|
||||||
register: rvm_profile
|
register: rvm_binary
|
||||||
|
|
||||||
- name: detect rvm installer
|
- name: detect rvm installer
|
||||||
stat: path={{ ruby_temp_download_path }}/rvm-installer.sh
|
stat: path={{ ruby_temp_download_path }}/rvm-installer.sh
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
- name: detect current rvm version
|
- name: detect current rvm version
|
||||||
shell: "{{ ruby_rvm_install_path }}/bin/rvm version"
|
shell: "{{ ruby_rvm_install_path }}/bin/rvm version"
|
||||||
register: rvm_current_version
|
register: rvm_current_version
|
||||||
when: rvm_profile.stat.exists
|
when: rvm_binary.stat.exists
|
||||||
|
|
||||||
- name: detect stable rvm version from url
|
- name: detect stable rvm version from url
|
||||||
uri: url={{ ruby_rvm_stable_version_number }} return_content=yes
|
uri: url={{ ruby_rvm_stable_version_number }} return_content=yes
|
||||||
@@ -31,19 +31,19 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ ruby_temp_download_path }}/rvm-installer.sh"
|
path: "{{ ruby_temp_download_path }}/rvm-installer.sh"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: not rvm_profile.stat.exists or ruby_rvm_force_upgrade_installer
|
when: not rvm_binary.stat.exists or ruby_rvm_force_upgrade_installer
|
||||||
|
|
||||||
- name: ensure rvm stable is installed
|
- name: ensure rvm stable is installed
|
||||||
command: "{{ ruby_temp_download_path }}/rvm-installer.sh --path {{ ruby_rvm_install_path }} stable"
|
command: "{{ ruby_temp_download_path }}/rvm-installer.sh --path {{ ruby_rvm_install_path }} stable"
|
||||||
when: not rvm_profile.stat.exists
|
when: not rvm_binary.stat.exists
|
||||||
|
|
||||||
- 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: rvm_stable_version_number.content|default(ruby_rvm_stable_version_number)|replace("\n", "") > rvm_current_version.stdout.split()[1] and rvm_profile.stat.exists
|
when: rvm_binary.stat.exists and rvm_stable_version_number.content|default(ruby_rvm_stable_version_number)|replace("\n", "") > rvm_current_version.stdout.split()[1]
|
||||||
|
|
||||||
- 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"
|
||||||
when: not rvm_profile.stat.exists
|
when: not rvm_binary.stat.exists
|
||||||
|
|
||||||
- name: detect if ruby version is installed
|
- name: detect if ruby version is installed
|
||||||
stat: path={{ ruby_rvm_install_path }}/rubies/ruby-{{ ruby_version }}
|
stat: path={{ ruby_rvm_install_path }}/rubies/ruby-{{ ruby_version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user