Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support epel-10 in the feature prepare plugin #3506

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions tmt/steps/prepare/feature/epel-enable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
register: output
changed_when: output.rc != 0

- name: Enable EPEL and EPEL-Next repos on RHEL 8, 9
- name: Enable EPEL and EPEL-Next repos on RHEL 8 and later
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version | int >= 8
# Drop the following line once EPEL10 becomes available
- ansible_distribution_major_version | int < 10
block:
- name: Install package 'epel-release'
ansible.builtin.dnf:
Expand All @@ -42,8 +40,9 @@
name: "https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" # yamllint disable rule:line-length
disable_gpg_check: true
state: present
# EPEL Next is available for CentOS Stream 9 and newer only
when: ansible_distribution_major_version | int >= 9
# EPEL Next is available for CentOS Stream 9
# Enable for Stream 10 once epel-next is available
when: ansible_distribution_major_version | int == 9

- name: Install 'dnf config-manager'
ansible.builtin.command: dnf -y install 'dnf-command(config-manager)'
Expand All @@ -59,8 +58,9 @@
ansible.builtin.command: dnf config-manager --enable epel-next epel-next-debuginfo epel-next-source
register: output
changed_when: output.rc != 0
# EPEL Next is available for CentOS Stream 9 and newer only
when: ansible_distribution_major_version | int >= 9
# EPEL Next is available for CentOS Stream 9
# Enable for Stream 10 once epel-next is available
when: ansible_distribution_major_version | int == 9

- name: Enable EPEL repos on CentOS 7
when:
Expand All @@ -82,12 +82,10 @@
register: output
changed_when: output.rc != 0

- name: Enable EPEL and EPEL-Next repos on CentOS Stream 8, 9
- name: Enable EPEL and EPEL-Next repos on CentOS Stream 8 and later
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version | int >= 8
# Drop the following line once EPEL10 becomes available
- ansible_distribution_major_version | int < 10
block:
- name: Install package 'epel-release'
ansible.builtin.dnf:
Expand All @@ -98,8 +96,9 @@
ansible.builtin.dnf:
name: epel-next-release
state: present
# EPEL Next is available for CentOS Stream 9 and newer only
when: ansible_distribution_major_version | int >= 9
# EPEL Next is available for CentOS Stream 9
# Enable for Stream 10 once epel-next is available
when: ansible_distribution_major_version | int == 9

- name: Install 'dnf config-manager'
ansible.builtin.command: dnf -y install 'dnf-command(config-manager)'
Expand All @@ -115,5 +114,6 @@
ansible.builtin.command: dnf config-manager --enable epel-next epel-next-debuginfo epel-next-source
register: output
changed_when: output.rc != 0
# EPEL Next is available for CentOS Stream 9 and newer only
when: ansible_distribution_major_version | int >= 9
# EPEL Next is available for CentOS Stream 9
# Enable for Stream 10 once epel-next is available
when: ansible_distribution_major_version | int == 9