Skip to content

Commit

Permalink
fix: install epel repo in RHEL 7 using static repo file (#781)
Browse files Browse the repository at this point in the history
* fix: Retry epel yum repo install up to 30s

* fix: install epel repo in RHEL 7 using static repo file (#782)

* fix: install epel repo in RHEL 7 using static repo file

* Update task description for installing epel repository

Co-authored-by: Dimitri Koshkin <[email protected]>

---------

Co-authored-by: Dimitri Koshkin <[email protected]>

---------

Co-authored-by: Shalin Patel <[email protected]>
Co-authored-by: Dimitri Koshkin <[email protected]>
  • Loading branch information
3 people committed Jun 30, 2023
1 parent cf18f90 commit d709eef
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
3 changes: 0 additions & 3 deletions ansible/roles/repo/defaults/main.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions ansible/roles/repo/files/etc/yum.repos.d/epel-7.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1
19 changes: 6 additions & 13 deletions ansible/roles/repo/tasks/redhat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,10 @@
when:
- ansible_distribution_major_version == '8'

- name: add epel gpg key for centos 7
rpm_key:
state: present
key: "{{ epel_centos_7_rpm_gpg_key }}"
when:
- ansible_distribution_major_version == '7'

- name: install epel-release for centos 7
yum:
name: "{{ epel_centos_7_rpm }}"
state: present
- name: add EPEL rpm repository
copy:
src: files/etc/yum.repos.d/epel-7.repo
dest: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution_major_version == '7'

Expand All @@ -124,5 +117,5 @@
gpgcheck: true
register: konvoy_repo_installation_rpm
until: konvoy_repo_installation_rpm is success
retries: 3
delay: 3
retries: 5
delay: 6
3 changes: 0 additions & 3 deletions images/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ kubernetes_version: "1.25.4"

download_images: true

epel_centos_7_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
epel_centos_7_rpm_gpg_key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7

packer:
goss_arch: amd64
goss_entry_file: goss/goss.yaml
Expand Down

0 comments on commit d709eef

Please sign in to comment.