mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-25 20:03:49 +00:00
use rpm -i instead of yum install for epel7
On BaseOS CI systems, `yum install` for the epel7 rpm does not work. Instead, use `rpm -i` which should work on any system. We should not need to use `yum install` here because the epel7 setup rpm does not have additional dependencies. In addition, the rpm download sometimes returns 403 - I think it is because multiple tests run in parallel in BaseOS CI, resulting in too many download attempts in too short a period of time - so introduce a retry to mitigate the situation. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
parent
036f7c3c1e
commit
53208608a4
1 changed files with 9 additions and 1 deletions
|
|
@ -3,10 +3,18 @@
|
|||
- block:
|
||||
- name: Create EPEL {{ ansible_distribution_major_version }}
|
||||
# yamllint disable-line rule:line-length
|
||||
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
command: rpm -iv https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
args:
|
||||
warn: false
|
||||
creates: /etc/yum.repos.d/epel.repo
|
||||
register: __epel_status
|
||||
# sometimes the rpm download returns a 403 - I think it is when too
|
||||
# many parallel jobs attempt the download from the same controller in
|
||||
# too short a period of time, so the epel server throttles additional
|
||||
# downloads - use a retry here to mitigate
|
||||
until: __epel_status is success
|
||||
retries: 6
|
||||
delay: 10
|
||||
|
||||
- name: Enable EPEL 7
|
||||
command: yum-config-manager --enable epel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue