Merge "Enable epel repository for more than CentOS"

This commit is contained in:
Zuul 2022-11-04 10:24:13 +00:00 committed by Gerrit Code Review
commit e635bdd29f

View File

@ -18,25 +18,28 @@
when: ansible_os_family == 'Debian'
- block:
- name: "Enable powertools repository for CentOS Stream 8"
- name: "Enable powertools repository for EL8"
command: dnf config-manager --set-enabled powertools
- name: "Enable EPEL repository for CentOS Stream 8"
command: dnf install -y epel-release
when:
- enable_epel | bool
- dib_os_element == "debian"
when:
- ansible_distribution == "CentOS"
- ansible_distribution_version|int == 8
when: ansible_distribution_version|int == 8
- name: "Enable EPEL repository for CentOS Stream 9"
- name: "Enable crb repository for EL9"
command: dnf config-manager --set-enabled crb
when: ansible_distribution_version|int == 9
- name: "Enable EPEL repository for EL7/8/9"
ansible.builtin.dnf:
name: epel-release
when:
- enable_epel | bool
- ansible_distribution in ["AlmaLinux", "CentOS", "Rocky"]
- name: "Enable EPEL repository for RedHat 9"
command: dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
args:
creates: /etc/yum.repos.d/epel.repo
when:
- enable_epel | bool
- dib_os_element == "debian"
- ansible_distribution == "CentOS"
- ansible_distribution == "RedHat"
- ansible_distribution_version|int >= 9
- name: "Install packages"
@ -81,16 +84,6 @@
state: present
when:
- install_dib | bool
- ansible_distribution != "CentOS"
- name: Ensure required packages are installed
dnf:
name: "{{ dib_host_required_packages | select | list }}"
enablerepo: epel
state: present
when:
- install_dib | bool
- ansible_distribution == "CentOS"
- name: "sushy - Install"
include_role: