Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit e479272

Browse files
duck-rhmscherer
authored andcommitted
make the role working on Debian (#8)
The package list is now family/distro adaptable, with the proper list of packages for Debian. Also 'bundle install' do not raise sudo on RedHat, but do on Debian. It is still unexplained but at the moment specifying the path with the current behavior seem the best/safe option.
1 parent eeffc48 commit e479272

File tree

3 files changed

+42
-17
lines changed

3 files changed

+42
-17
lines changed

tasks/main.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
---
2+
3+
- include_vars: "{{ item }}"
4+
with_first_found:
5+
- "{{ ansible_distribution }}.yml"
6+
- "{{ ansible_os_family }}.yml"
7+
28
- name: Install packages
39
package: name={{ item }} state=present
4-
with_items:
5-
- rubygem-bundler
6-
- ruby-devel
7-
- curl-devel
8-
- git
9-
- make
10-
- gcc
11-
- gcc-c++
12-
- ImageMagick
13-
# used to send email about build broken
14-
- mutt
15-
# nokogiri build requires patch
16-
- patch
17-
# nokogiri also requires zlib-devel to build libxml
18-
- zlib-devel
19-
- PyYAML
10+
with_items: "{{ package_list }}"
2011

2112
- name: Install more packages for Fedora
2213
package:
@@ -64,7 +55,7 @@
6455
become_method: 'su'
6556

6657
- name: Install gems required to build
67-
command: bundle install
58+
command: "bundle install --path ~/.gem"
6859
args:
6960
chdir: "{{ checkout_dir }}"
7061
become: yes

vars/Debian.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
package_list:
3+
- ruby-bundler
4+
- ruby-dev
5+
- libcurl4-gnutls-dev
6+
- git
7+
- build-essential
8+
- imagemagick
9+
# used to send email about build broken
10+
- mutt
11+
# nokogiri build requires patch
12+
- patch
13+
# nokogiri also requires zlib-devel to build libxml
14+
- zlib1g-dev
15+
- python-yaml
16+

vars/RedHat.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
package_list:
3+
- rubygem-bundler
4+
- ruby-devel
5+
- curl-devel
6+
- git
7+
- make
8+
- gcc
9+
- gcc-c++
10+
- ImageMagick
11+
# used to send email about build broken
12+
- mutt
13+
# nokogiri build requires patch
14+
- patch
15+
# nokogiri also requires zlib-devel to build libxml
16+
- zlib-devel
17+
- PyYAML
18+

0 commit comments

Comments
 (0)