Skip to content

Commit 72d0a29

Browse files
authored
Merge pull request #214 from AlmaLinux/module-hotfixes
Enable module_hotfixes in build repos for non-modular MariaDB packages on EL8
2 parents 0e4bc4a + 92c9966 commit 72d0a29

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

  • resources/roles/install_uninstall/tasks

resources/roles/install_uninstall/tasks/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- ansible.builtin.set_fact:
1616
is_alt_package: "{{ pkg_name | regex_search('^alt-(php|python|ruby|nodejs).*', ignorecase=True) is not none }}"
1717
is_custom_mysql_package: "{{ pkg_name | regex_search('^cl-(mysql|mariadb).*', ignorecase=True) is not none }}"
18+
is_mariadb_package: "{{ pkg_name.startswith('MariaDB') }}"
1819
is_ea_apache24_mod_lsapi: "{{ pkg_name.startswith('ea-apache24-mod-lsapi') }}"
1920
is_ea_apache24_mod_cgid: "{{ pkg_name.startswith('ea-apache24-mod_cgid') }}"
2021
is_ea_apache24_mod_http2: "{{ pkg_name.startswith('ea-apache24-mod_http2') }}"
@@ -122,6 +123,36 @@
122123
tags:
123124
- install_package
124125

126+
- name: Find build system repo files
127+
ansible.builtin.find:
128+
paths: /etc/yum.repos.d
129+
patterns:
130+
- "*-br.repo"
131+
- "*-br-*.repo"
132+
register: br_repo_files
133+
when:
134+
- ansible_facts.os_family == 'RedHat'
135+
- ansible_facts.distribution_major_version == '8'
136+
- is_mariadb_package
137+
- module_name is not defined
138+
tags:
139+
- install_package
140+
141+
- name: Enable module_hotfixes in build repos for MariaDB packages on EL8
142+
community.general.ini_file:
143+
path: "{{ item.path }}"
144+
section: "{{ item.path | basename | regex_replace('\\.repo$', '') }}"
145+
option: module_hotfixes
146+
value: "1"
147+
loop: "{{ br_repo_files.files | default([]) }}"
148+
when:
149+
- ansible_facts.os_family == 'RedHat'
150+
- ansible_facts.distribution_major_version == '8'
151+
- is_mariadb_package
152+
- module_name is not defined
153+
tags:
154+
- install_package
155+
125156
- name: Install RPM package
126157
ansible.builtin.package:
127158
name: "{{ pkg_name }}"

0 commit comments

Comments
 (0)