-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.yml
54 lines (47 loc) · 1.97 KB
/
default.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
52
53
54
---
- hosts: all
vars:
rubyversion: 2.3.3
make: make
tasks:
# - group_by: key=os_{{ ansible_system }}
- group_by: key=os_{{ ansible_os_family }}
- group_by: key=dist_{{ ansible_distribution }}
# - group_by: key=os_{{ ansible_distribution }}_{{ ansible_distribution_major_version }}
- include: "{{ item }}"
with_first_found:
- files:
- tasks/os_{{ ansible_os_family }}.yml
skip: true
- name: Install C compiler and tools
package:
name: "{{ item }}"
state: present
use: "{% if ansible_distribution == 'OpenIndiana' %}pkg5{% elif ansible_distribution == 'Solaris' %}pkgutil{% else %}auto{% endif %}"
with_items: "{{ ctools }}"
- name: Install git
package:
name: "{{ gitpkg }}"
state: present
use: "{% if ansible_distribution == 'OpenIndiana' %}pkgin{% elif ansible_distribution == 'Solaris' %}pkgutil{% else %}auto{% endif %}"
- name: /usr/local/source directory
file: path=/usr/local/source state=directory owner=root mode=0755
- name: Fetch ruby-build repo
git:
repo: https://github.com/rbenv/ruby-build.git
dest: /usr/local/source/ruby-build
- name: Install ruby build dependencies
package:
name: "{{ item }}"
state: present
use: "{% if ansible_distribution == 'OpenIndiana' %}pkg5{% else %}auto{% endif %}"
with_items: "{{ rubybuilddeps }}"
# - name: Build and install ruby {{ rubyversion }}
# shell: /usr/local/source/ruby-build/bin/ruby-build "{{ rubyversion }}" /usr/local/ruby/"{{ rubyversion }}" creates=/usr/local/ruby/{{ rubyversion }}/bin/ruby
# environment:
# CONFIGURE_OPTS: --disable-install-doc --with-out-ext=tcl --with-out-ext=tk
# RUBY_BUILD_BUILD_PATH: /var/tmp/ruby-build
# MAKE: "{{ make }}"
#
# - name: Create /usr/local/ruby/kitchen symlink
# file: src=/usr/local/ruby/{{ rubyversion }} dest=/usr/local/ruby/kitchen state=link