Files
ansible-role-rvm/tasks/rvm.yml
Nick Janetakis a1faa54af6 Remove the python-httplib2 dependency
Rather than check the remote VERSION with the 'uri' Ansible module
I decided to just always run rvm update unless you specifically disable
that in the default options.

The benefits of this change is that the role no longer depends on any
packages and CentOS 7 does not have python-httplib2 anyways.

The cons of this change is that the update takes an additional 2-3
seconds to run when it was skipped previously unless needed. However, with the
elimination of quite a few tasks and logic the overall run speed of the
role is faster than before.
2014-10-16 10:22:33 -04:00

43 lines
1.1 KiB
YAML

---
- name: Detect rvm binary
stat: path='{{ rvm1_rvm }}'
register: rvm_binary
- name: Detect rvm installer
stat: path='{{ rvm1_temp_download_path }}/rvm-installer.sh'
register: rvm_installer
- name: Detect current rvm version
command: '{{ rvm1_rvm}} version'
changed_when: False
register: rvm_current_version
when: rvm_binary.stat.exists
- name: Install rvm installer
get_url:
url: '{{ rvm1_rvm_latest_installer }}'
dest: '{{ rvm1_temp_download_path }}/rvm-installer.sh'
when: not rvm_installer.stat.exists
- name: Configure rvm installer
file:
path: '{{ rvm1_temp_download_path }}/rvm-installer.sh'
mode: 0755
when: not rvm_binary.stat.exists
- name: Install rvm
command: >
{{ rvm1_temp_download_path }}/rvm-installer.sh {{ rvm1_rvm_version }}
--path {{ rvm1_install_path }} {{ rvm1_install_flags }}
when: not rvm_binary.stat.exists
- name: Update rvm
shell: '{{ rvm1_rvm }} get {{ rvm1_rvm_version }} && {{ rvm1_rvm }} reload'
changed_when: False
when: rvm_binary.stat.exists and rvm1_rvm_check_for_updates
- name: Configure rvm
command: '{{ rvm1_rvm }} autolibs 3'
when: not rvm_binary.stat.exists