Adding CentOS/RedHat context specific tasks

This commit is contained in:
Josh Brown
2014-09-22 14:14:47 -07:00
parent 029b1ae037
commit a27e044890
5 changed files with 29 additions and 10 deletions

View File

@@ -103,7 +103,8 @@ Just add `--extra-vars 'rvm1_delete_ruby=ruby-2.1.0'` to the end of your play bo
## Requirements
Tested on ubuntu 12.04 LTS but it should work on other versions that are similar.
- Tested on ubuntu 12.04 LTS but it should work on other versions that are similar.
- Tested on RHEL6.5 and CentOS 6.5
## Ansible galaxy

View File

@@ -7,6 +7,9 @@ galaxy_info:
min_ansible_version: 1.5
platforms:
- name: EL
versions:
- all
- name: Ubuntu
versions:
- all
@@ -15,4 +18,4 @@ galaxy_info:
- development
- web
dependencies: []
dependencies: []

10
tasks/debian.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: Debian/Ubuntu - Install httplib2 to use the uri module
apt:
pkg: 'python-httplib2'
state: 'latest'
update_cache: True
cache_valid_time: '{{ apt_cache_valid_time }}'
sudo: True
sudo_user: root

View File

@@ -1,13 +1,10 @@
---
- name: Install httplib2 to use the uri module
apt:
pkg: 'python-httplib2'
state: 'latest'
update_cache: True
cache_valid_time: '{{ apt_cache_valid_time }}'
sudo: True
sudo_user: root
- include: 'debian.yml'
when: ansible_os_family == 'Debian'
- include: 'redhat.yml'
when: ansible_os_family == 'RedHat'
- include: 'rvm.yml'
- include: 'rubies.yml'

8
tasks/redhat.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: RedHat/CentOS - Install httplib2 to use the uri module
yum:
pkg: 'python-httplib2'
state: 'latest'
sudo: True
sudo_user: root