From: Anil Belur Date: Fri, 12 Dec 2025 07:16:57 +0000 (+1000) Subject: Fix: CS Stream 9 EPEL installation in prepare.yml X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F76%2F73976%2F1;p=ansible%2Froles%2Fhaveged-install.git Fix: CS Stream 9 EPEL installation in prepare.yml - Use dnf to install epel-release for CentOS 9 (available in base repos) - Keep URL-based installation for CentOS 7/8 - Matches pattern used in python-install role Change-Id: I1bc84d251a554c52348839e26a45874ff8049d4e Signed-off-by: Anil Belur --- diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index 2be4a86..aa2729e 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -9,10 +9,17 @@ when: ansible_distribution == 'Ubuntu' become: true - - name: Install EPEL release repo + - name: Install EPEL for CentOS 9 + ansible.builtin.dnf: + name: epel-release + state: present + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '9' + become: true + + - name: Install EPEL for CentOS 7/8 ansible.builtin.yum: name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm state: present disable_gpg_check: True - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 9 become: true