Update role to use distro-specific includes.

This commit is contained in:
Jeff Geerling 2015-01-05 09:04:36 -06:00
parent 621df1e600
commit 46026b274a
3 changed files with 15 additions and 14 deletions

View File

@ -1,18 +1,7 @@
---
# RedHat installation.
- name: Install Ansible (RedHat).
yum: pkg=ansible state=installed enablerepo=epel
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
# Debian installation.
- name: Add rquillo repository (Debian).
apt_repository: repo='ppa:ansible/ansible'
when: ansible_os_family == 'Debian'
- name: Update apt cache (Debian).
apt: update_cache=yes cache_valid_time=86400
when: ansible_os_family == 'Debian'
- name: Install Ansible (Debian).
apt: pkg=ansible state=installed
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'

9
tasks/setup-Debian.yml Normal file
View File

@ -0,0 +1,9 @@
---
- name: Add ansible repository.
apt_repository: repo='ppa:ansible/ansible'
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=86400
- name: Install Ansible.
apt: name=ansible state=installed

3
tasks/setup-RedHat.yml Normal file
View File

@ -0,0 +1,3 @@
---
- name: Install Ansible.
yum: name=ansible state=installed enablerepo=epel