Fix: CS Stream 9 EPEL installation in prepare.yml 76/73976/1 master
authorAnil Belur <abelur@linuxfoundation.org>
Fri, 12 Dec 2025 07:16:57 +0000 (17:16 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 12 Dec 2025 07:18:04 +0000 (17:18 +1000)
- 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 <abelur@linuxfoundation.org>
molecule/default/prepare.yml

index 2be4a86..aa2729e 100644 (file)
@@ -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