-
-
Notifications
You must be signed in to change notification settings - Fork 136
/
rvm.yml
51 lines (42 loc) · 1.44 KB
/
rvm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- 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'
mode: 0755
when: not rvm_installer.stat.exists
- name: Import GPG keys
command: 'gpg --keyserver {{ rvm1_gpg_key_server }} --recv-keys {{ rvm1_gpg_keys }}'
changed_when: False
when: rvm1_gpg_keys != ''
register: gpg_result
until: gpg_result.rc == 0
retries: 5
delay: 5
ignore_errors: True
- name: Import GPG keys the other way
shell: curl -sSL https://rvm.io/mpapis.asc | gpg --import -
when: rvm1_gpg_keys != '' and gpg_result.rc != 0
- 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 {{ rvm1_autolib_mode }}'
when: not rvm_binary.stat.exists