consolidate EPEL change into a single task

as per @smana request
pull/203/head
Rob Hirschfeld 2016-04-12 18:41:46 -07:00
parent 831a54e9b7
commit f12ad6a56f
1 changed files with 2 additions and 9 deletions

View File

@ -78,17 +78,10 @@
ansible_distribution_major_version > 21 ansible_distribution_major_version > 21
changed_when: False changed_when: False
- name: Check if epel-release-7-5.noarch is installed - name: Install epel-release on RedHat/CentOS
command: rpm -q epel-release-7-5.noarch shell: rpm -qa | grep epel-release || rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
register: epel_check
when: ansible_distribution in ["CentOS","RedHat"] and when: ansible_distribution in ["CentOS","RedHat"] and
ansible_distribution_major_version >= 7 ansible_distribution_major_version >= 7
- name: Install epel-release on RedHat/CentOS
command: rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
when: ansible_distribution in ["CentOS","RedHat"] and
ansible_distribution_major_version >= 7 and
epel_check.stdout.find('is not installed') != -1
changed_when: False changed_when: False
- name: Install packages requirements - name: Install packages requirements