diff --git a/README.md b/README.md index f474afc..a3166f0 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 07e11de..b28ee20 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 0000000..c4cac5f --- /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 d2fffbd..1e34738 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 0000000..6a2a35e --- /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