From a27e044890c2a8bc193cd0a30d8b0e42268b0f30 Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 22 Sep 2014 14:14:47 -0700 Subject: [PATCH] Adding CentOS/RedHat context specific tasks --- README.md | 3 ++- meta/main.yml | 5 ++++- tasks/debian.yml | 10 ++++++++++ tasks/main.yml | 13 +++++-------- tasks/redhat.yml | 8 ++++++++ 5 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 tasks/debian.yml create mode 100644 tasks/redhat.yml diff --git a/README.md b/README.md index f474afccb..a3166f090 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/meta/main.yml b/meta/main.yml index 07e11de74..b28ee20c5 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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: [] \ No newline at end of file +dependencies: [] diff --git a/tasks/debian.yml b/tasks/debian.yml new file mode 100644 index 000000000..c4cac5fff --- /dev/null +++ b/tasks/debian.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index d2fffbdde..1e3473873 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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' diff --git a/tasks/redhat.yml b/tasks/redhat.yml new file mode 100644 index 000000000..6a2a35e14 --- /dev/null +++ b/tasks/redhat.yml @@ -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