Skip to content

Commit 70483bc

Browse files
fix(roles/repo_mariadb): scope dnf module disable and module_hotfixes to RHEL 8/9
On RHEL 10 modularity was removed (DNF5) and the `mariadb` module no longer exists, so `dnf -y module disable mariadb` fails with `missing groups or modules: mariadb`. Limit both the task and the `module_hotfixes = 1` directive in the generated `MariaDB.repo` to RHEL 8 and 9 only.
1 parent d3c655f commit 70483bc

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
* **role:infomaniak_vm**: Stop passing `security_groups` to `openstack.cloud.server`. Since the security group is already applied on the `ext-net1` port, setting it on the server made Neutron attempt the same on internal-network ports where `port_security_enabled` is `false`, failing with `Network requires port_security_enabled and subnet associated in order to apply security groups.`
3030
* **role:openvpn_server**: Fix `invalid selinux context: [Errno 22] Invalid argument` on RHEL 10 when deploying `server.p12` / `crl.pem`. The SELinux type `openvpn_etc_t` no longer exists in the RHEL 10 core policy (only `openvpn_port_t` and the packet types remain). The role now uses `etc_t` on RHEL 10 via a new OS-specific internal variable `__openvpn_server__selinux_etc_type`; other platforms keep `openvpn_etc_t`
3131
* **role:repo_epel**: Fix malformed RHEL 10 `epel.repo`: a missing newline in the `[epel-source]` section rendered `enabled=0username=<login>` when `repo_epel__basic_auth_login` was set, causing dnf to reject the file with `Invalid configuration value: enabled=0username=...`
32+
* **role:repo_mariadb**: Fix `dnf -y module disable mariadb` failing on RHEL 10 with `missing groups or modules: mariadb`. Modularity was removed in EL10 (DNF5) and the `mariadb` module no longer exists, so the task and the corresponding `module_hotfixes = 1` directive in the generated `MariaDB.repo` are now scoped to RHEL 8 and 9 only
3233
* **role:infomaniak_vm**: Apply the VM's security group on the `ext-net1` port instead of (only) on the server. When a VM boots against a pre-created port, Neutron enforces the port's security groups, not those passed to the server, so without this the configured rules were silently ignored on the public interface
3334
* **role:logstash**: Default value of `logstash__java_opts` now caps JVM heap size at 8g.
3435
* **role:logstash**: Default value of `logstash__java_opts` now sets JVM heap size to be 60% of total memory.

COMPATIBILITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ logstash | | | | x | | | x |
9898
lvm | | | | | | | |
9999
mailto_root | | | x | x | | | |
100100
mailx | x | x | x | x | x | | | Fedora
101-
mariadb_server | x | x | x | x | | | | Galera on Debian is untested
101+
mariadb_server | x | x | x | x | x | | | Galera on Debian is untested
102102
mastodon | | | | x | | | |
103103
maxmind_geoip | | | x | | | | |
104104
minio_client | | | x | | | | |
@@ -146,7 +146,7 @@ repo_grafana | x | x | x | x | | | |
146146
repo_graylog | x | x | x | | | | |
147147
repo_icinga | x | x | x | x | | x | |
148148
repo_influxdb | x | x | x | x | | | |
149-
repo_mariadb | x | x | x | x | | | x |
149+
repo_mariadb | x | x | x | x | x | | x |
150150
repo_mongodb | x | x | x | x | | | |
151151
repo_monitoring_plugins | | | x | x | | x | |
152152
repo_mydumper | | | x | x | | | |

roles/repo_mariadb/tasks/RedHat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
ansible.builtin.command: 'dnf -y module disable mariadb'
4646
register: 'repo_mariadb__command_result'
4747
changed_when: "'Nothing to do' not in repo_mariadb__command_result.stdout"
48-
when: 'ansible_facts["distribution_major_version"] | int > 7'
48+
when: 'ansible_facts["distribution_major_version"] | int in [8, 9]'
4949

5050
tags:
5151
- 'repo_mariadb'

roles/repo_mariadb/templates/etc/yum.repos.d/RedHat-MariaDB.repo.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# {{ ansible_managed }}
2-
# 2025080401
2+
# 2026042701
33

44
[mariadb-main]
55
name = MariaDB Server
@@ -11,7 +11,7 @@ baseurl = https://rpm.mariadb.org/{{ repo_mariadb__version }}/rhel/$releasever/$
1111
gpgkey = file:///etc/pki/rpm-gpg/MariaDB-Server-GPG-KEY
1212
gpgcheck = 1
1313
enabled = 1
14-
{% if ansible_facts["distribution_major_version"] | int > 7 %}
14+
{% if ansible_facts["distribution_major_version"] | int in [8, 9] %}
1515
module_hotfixes = 1
1616
{% endif %}
1717
{% if repo_mariadb__basic_auth_login is defined and repo_mariadb__basic_auth_login | length %}

0 commit comments

Comments
 (0)