Make OL get Fedora's EPEL but force it to lower priority over Oracle EPEL so that rpmfusion works, and we hopefully do not break OS patching again

This commit is contained in:
2026-08-09 11:49:52 -05:00
parent 738e938ccc
commit 6eb2875e44
3 changed files with 32 additions and 0 deletions
+24
View File
@@ -60,5 +60,29 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify: [ensure_repo_epel.package_facts, ensure_repo_epel.service_facts]
- name: prioritize oracle epel repo
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["distribution"] == 'OracleLinux'
community.general.ini_file:
path: "/etc/yum.repos.d/oracle-epel-ol{{ ansible_facts['distribution_major_version'] }}.repo"
section: "ol{{ ansible_facts['distribution_major_version'] }}_developer_EPEL"
option: priority
value: '1'
no_extra_spaces: true
mode: '0644'
create: false
- name: deprioritize upstream epel repo
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["distribution"] == 'OracleLinux'
community.general.ini_file:
path: "/etc/yum.repos.d/epel.repo"
section: epel
option: priority
value: '99'
no_extra_spaces: true
mode: '0644'
create: false
- name: flush handlers
ansible.builtin.meta: flush_handlers