Skip to content

Commit 5e53c0b

Browse files
committed
fix(roles/mariadb_server): inherit server default charset/collation for new databases
1 parent de1648f commit 5e53c0b

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828

2929
### Changed
3030

31+
* **role:mariadb_server**: Databases created via `mariadb_server__databases` without an explicit `collation` or `encoding` now inherit the server default character set and collation (utf8mb4) instead of being pinned to the legacy `utf8` / `utf8_general_ci` (utf8mb3, no full Unicode). Existing databases are unaffected; set `collation` / `encoding` per database to override.
3132
* **role:collabora**: Support Collabora Online CODE 25.04.10. The role ships one `coolwsd.xml` template per CODE release and had none for this version, so it aborted the deploy on hosts that had updated to it.
3233
* **role:clamav**: Send notification mails through `sendmail` (provided by postfix) instead of the `mail` command (mailx). One invocation works across distributions, and delivery no longer depends on mailx being installed.
3334
* **role:icingadb, role:icingaweb2, role:icingaweb2_module_reporting, role:icingaweb2_module_x509, role:mariadb_server**: Move the MariaDB tasks from the deprecated `community.mysql` collection to its replacement `ansible.mysql`. Behaviour is unchanged, but the deprecation warnings printed on every run are gone and the roles keep working once `community.mysql` is removed upstream.

roles/mariadb_server/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,13 @@ mariadb_server__dump_user:
227227

228228
* Optional. DB collation.
229229
* Type: String.
230+
* Default: empty; the database inherits the server default (`mariadb_server__cnf_collation_server__combined_var`).
230231

231232
* `encoding`:
232233

233-
* Optional. DB encoding.
234+
* Optional. DB encoding (character set).
234235
* Type: String.
236+
* Default: empty; the database inherits the server default (`mariadb_server__cnf_character_set_server__combined_var`).
235237

236238
* `state`:
237239

roles/mariadb_server/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@
717717
login_password: '{{ mariadb_server__admin_user["password"] }}'
718718
login_unix_socket: '{{ mariadb_server__cnf_socket__combined_var }}'
719719
name: '{{ item["name"] }}'
720-
collation: '{{ item["collation"] | default("utf8_general_ci") }}'
721-
encoding: '{{ item["encoding"] | default("utf8") }}'
720+
collation: '{{ item["collation"] | default(omit) }}'
721+
encoding: '{{ item["encoding"] | default(omit) }}'
722722
state: '{{ item["state"] | default("present") }}'
723723
loop: '{{ mariadb_server__databases__combined_var }}'
724724
loop_control:

0 commit comments

Comments
 (0)