browbeat/ansible/install/roles/epel/tasks/main.yml
jkilpatr c11374cca1 Move collectd into the main Ansible run for CI
This commit allows CI to run the collectd-openstack role directly
to do this I take the relevent variables from the group_vars/all.yml
and duplicate them in to the defaults. If you're not making mix and
match playbooks with browbeat roles and run the playbooks 'normally'
these defaults will never affect you in any way and will be overridden
by the group_vars/all.yml file without any interaction from you.

If on the other hand you want a playbook where you can toss collectd
install whereever you need it, this makes life much easier. Also note
that the trick I'm using to get the name of the executing hosts first
group could be used to make the collectd-openstack playbook run in
parallel across all hosts all at once rather than one group at a time.

As one final tweak this adds 10 minutesof retires to the epel install
role, specifically because two of it's tasks rely on external internet
access and fail often enough to cause trouble. Previously I would retry
the whole CollectD playbook when that happened, this is more efficient

Change-Id: Ia67ab2b4152a8d8e9f3ba1dabe1f4417d7b86233
2017-05-04 13:28:02 +00:00

30 lines
677 B
YAML

---
#
# Tasks install EPEL packages
#
- name: Remove old EPEL
yum: name=epel-release state=absent
become: true
# The fedoraproject CDN has problems somtimes, this will keep trying
# for up to 10 minutes before failing.
- name: Import EPEL GPG Key
rpm_key: key=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
state=present
become: true
register: import_result
until: import_result|success
retries: 10
delay: 60
# 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|success
retries: 10
delay: 60
notify: remove_epel