-
Notifications
You must be signed in to change notification settings - Fork 2
/
rvm.yml
39 lines (39 loc) · 1.03 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
---
- hosts: local
connection: local
tasks:
-
name: Install ruby build dependencies
yum: name={{item}} state=present
with_items:
- autoconf
- automake
- bison
- gcc-c++
- libffi-devel
- libtool
- libyaml-devel
- openssl-devel
- readline-devel
- zlib-devel
- hosts: local
connection: local
sudo: yes
sudo_user: "{{user}}"
tasks:
-
name: Install rvm
shell: curl -L https://get.rvm.io | bash -s -- creates={{home}}/.rvm
-
name: Disable autolibs
lineinfile: dest={{home}}/.rvm/user/db line="autolibs=read-only" regexp="^autolibs=" state=present create=yes
-
name: Check for a default ruby
shell: source {{home}}/.bash_profile && rvm list default | grep "Default Ruby"
ignore_errors: true
changed_when: False
register: default
-
name: Install an MRI ruby as default
shell: source {{home}}/.bash_profile && rvm install --default --docs ruby
when: default|failed