Skip to content

Commit

Permalink
Merge pull request #1 from woledzki/master
Browse files Browse the repository at this point in the history
Add support for RedHat / CentOS
  • Loading branch information
pjan committed Sep 6, 2014
2 parents e6d5b73 + e60ea3c commit af031dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# file: build-essential/tasks/main.yml

- name: build-essential | Read the family variables
- name: Read the family variables
include_vars: "{{ansible_os_family}}.yml"

- name: build-essential | Make sure the packages are installed (Debian)
- name: Make sure the packages are installed (Debian)
apt:
pkg: "{{item}}"
state: present
with_items: buildessential_packages
when: ansible_os_family == "Debian"

- name: build-essential | Make sure the packages are installed (Fedora)
- name: Make sure the packages are installed (Fedora)
yum:
name: "{{item}}"
state: present
with_items: buildessential_packages
when: ansible_os_family == "Fedora"

- name: build-essential | Make sure the packages are installed (Suse)
- name: Make sure the packages are installed (RedHat)
yum:
name: "{{item}}"
state: present
with_items: buildessential_packages
when: ansible_os_family == "RedHat"

- name: Make sure the packages are installed (Suse)
zypper:
name: "{{item}}"
state: present
Expand Down
13 changes: 13 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# file: build-essential/vars/RedHat.yml

buildessential_packages:
- autoconf
- gcc
- bison
- flex
- gcc-c++
- gettext
- kernel-devel
- make
- m4
- ncurses-devel

0 comments on commit af031dd

Please sign in to comment.