browbeat/ansible/install/roles/epel/tasks/main.yml
agopi f40c430c20 Fixing for rpm_key functionality
Using var is success instead of var.rc == 0 as its not
a shell command

Change-Id: Ia3b26d594fd4618763d8aba21ca90c5be4dddeae
2018-08-04 21:05:45 -04:00

31 lines
654 B
YAML

---
#
# Tasks install EPEL packages
#
- name: Remove old EPEL
yum: name=epel-release state=absent
become: true
# The fedoraproject CDN has problems sometimes, this will keep trying
# for up to 10 minutes before failing.
- name: Import EPEL GPG Key
rpm_key:
state: present
key: "{{ epel7_rpmkey }}"
become: true
register: import_result
until: import_result is success
retries: 10
delay: 10
# Same as above but with the Centos CDN
- name: Check for EPEL repo
yum: "name={{ epel7_rpm }} state=present"
become: true
register: install_result
until: install_result is success
retries: 10
delay: 10
notify: remove_epel