Renamed the mariadb, openldap and postgres database

This commit is contained in:
2025-07-12 16:06:13 +02:00
parent e174523fc6
commit 3b03c5171d
84 changed files with 210 additions and 106 deletions

View File

@@ -0,0 +1,44 @@
# defaults/
This directory contains default variable definition files for the `svc-db-mariadb` Ansible role. It centralizes all configurable values related to MariaDB deployment and can be adjusted without modifying task logic.
---
## files and their purpose
### `main.yml`
Defines default values for how the MariaDB database should be created.
* **`database_encoding`** (string):
* **Default:** `"utf8mb4"`
* **Reasoning:**
* **Full Unicode support**: `utf8mb4` is the only MySQL/MariaDB character set that fully implements 4byte UTF8, allowing storage of emojis, supplementary symbols, and all global scripts without data loss.
* **Futureproof:** Modern applications and standards have converged on UTF8; using `utf8mb4` avoids migration challenges later.
* **Performance tradeoff:** While slightly more storage might be used compared to `latin1`, the universality of `utf8mb4` outweighs the cost for most deployments.
* **`database_collation`** (string):
* **Default:** `"utf8mb4_unicode_ci"`
* **Reasoning:**
* **Accurate sorting & comparison:** This collation uses full Unicode algorithm rules, ensuring linguistically correct comparisons across many languages.
* **Caseinsensitive (`ci`):** Most web apps expect caseinsensitive matching for usernames, emails, and search queries, improving usability.
* **Neutral choice:** Unlike languagespecific collations, `unicode_ci` works robustly in multilingual contexts without bias.
> **Tip:** If you have a legacy application requiring a different charset or collation (e.g., for backward compatibility with existing data), simply override `database_encoding` and `database_collation` in your playbook-level variables.
## Overriding default variables
To customize any of these values without editing role defaults:
1. Create or update a playbook-level vars file (e.g. `group_vars/all/svc-db-mariadb.yml`).
2. Set the desired values, for example:
```yaml
database_encoding: "latin1"
database_collation: "latin1_swedish_ci"
```
3. Run your playbook—Ansibles variable precedence ensures your overrides take effect.

View File

@@ -0,0 +1,3 @@
# Check out the README.md file for more information, why this encodings and collations are used
database_encoding: "utf8mb4"
database_collation: "utf8mb4_unicode_ci"