{"id":21163500,"url":"https://github.com/punktde/ansible-proserver-mariadb","last_synced_at":"2026-04-11T02:39:18.406Z","repository":{"id":53194137,"uuid":"109398943","full_name":"punktDe/ansible-proserver-mariadb","owner":"punktDe","description":"Ansible role to configure MariaDB on a proServer.","archived":false,"fork":false,"pushed_at":"2024-12-16T10:40:55.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-21T09:48:46.951Z","etag":null,"topics":["ansible","database","mariadb","mysql","proserver"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/punktDe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-03T13:30:50.000Z","updated_at":"2024-12-16T10:40:29.000Z","dependencies_parsed_at":"2023-12-04T10:24:58.125Z","dependency_job_id":"a3536622-7a1e-4b06-a71d-6eee82cd97db","html_url":"https://github.com/punktDe/ansible-proserver-mariadb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-mariadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-mariadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-mariadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-mariadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/punktDe","download_url":"https://codeload.github.com/punktDe/ansible-proserver-mariadb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243609232,"owners_count":20318755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","database","mariadb","mysql","proserver"],"created_at":"2024-11-20T13:48:07.131Z","updated_at":"2026-04-11T02:39:18.400Z","avatar_url":"https://github.com/punktDe.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- BEGIN_ANSIBLE_DOCS --\u003e\n\u003c!--\nDo not edit README.md directly!\n\nThis file is generated automatically by aar-doc and will be overwritten.\n\nPlease edit meta/argument_specs.yml instead.\n--\u003e\n# ansible-proserver-mariadb\n\nmariadb role for Proserver\n\n## Supported Operating Systems\n\n- Debian 12, 13\n- Ubuntu 24.04, 22.04\n- FreeBSD [Proserver](https://infrastructure.punkt.de/de/produkte/proserver.html)\n\n## Role Arguments\n\n\n\nInstalls and configures MariaDB on Debian/Ubuntu and FreeBSD based systems.\n\nSupports single-node deployments as well as Galera clusters (including garbd arbitrator nodes).\n\nHandles database creation, user management and optional automated backups.\n\n#### Options for `mariadb`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `version` | MariaDB major.minor version to install. Used to build repository URLs and to pick compatible packages. | str | no | 11.8 |\n| `prefix` | Base directories for MariaDB configuration files. | dict of 'prefix' options | no | {} |\n| `socket` | Path to the MariaDB UNIX socket used by `mysql` CLI modules and health checks. | str | no | {% if ansible_facts['system'] == 'Linux' %}/run/mysqld/mysqld.sock{% else %}/tmp/mysql.sock{% endif %} |\n| `service` | Systemd/rc service name that is controlled by the role. | str | no | {% if ansible_facts['system'] == 'Linux' %}mysql{% else %}mysql-server{% endif %} |\n| `repository` | Optional vendor repository configuration (currently only APT is supported). | dict of 'repository' options | no |  |\n| `my.cnf` | Declarative representation of the contents that should end up in `zz-ansible.cnf`. Keys correspond to section names (`mysqld`, `mysqld_safe`, `galera`, ...); nested keys represent option/value pairs. Values set to `null` remove the option from the rendered file. | dict | no |  |\n| `database_defaults` | Fallback charset/collation used when a database entry omits explicit values. | dict of 'database_defaults' options | no | {'encoding': 'utf8mb4', 'collation': 'utf8mb4_unicode_ci'} |\n| `databases` | Declarative list of databases to create; keys are arbitrary identifiers. Each entry must set `name` and can optionally define `encoding`, `collation`, `import_file`, or a nested `backup` dict with the same shape as `mariadb.backup` for per-database overrides. When `import_file` is present, the local file is uploaded and restored immediately after creation. | dict | no |  |\n| `users` | Database users and grants to configure; keys are arbitrary user identifiers. Each entry expects `password`, a `hosts` mapping (values can be strings or lists) and a `privileges` dict whose values follow the `\u003cdb\u003e.\u003ctable\u003e:priv1,priv2` syntax consumed by `community.mysql.mysql_user`. The role will iterate over every host in `hosts` and apply the merged privilege strings. | dict | no |  |\n| `galera` | Settings that control Galera behaviour. | dict of 'galera' options | no | {} |\n| `backup` | Controls whether automated dumps are made and when they run. | dict of 'backup' options | no | {} |\n\n#### Options for `mariadb.prefix`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `config` | Parent directory that will contain `conf.d`/`mariadb.conf.d`. Change this only when using custom filesystem layouts. | str | no | {% if ansible_facts['system'] == 'Linux' %}/etc/mysql{% else %}/usr/local/etc/mysql{% endif %} |\n| `lib` | Data directory used by MariaDB (e.g. for grastate.dat on Galera nodes). Linux uses `/var/lib/mysql`; FreeBSD uses `/var/db/mysql`. | str | no | {% if ansible_facts['system'] == 'Linux' %}/var/lib/mysql{% else %}/var/db/mysql{% endif %} |\n\n#### Options for `mariadb.repository`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `apt` | Repository definition that will be managed on Debian/Ubuntu hosts. | dict of 'apt' options | no | {} |\n\n#### Options for `mariadb.repository.apt`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `key_url` | URL of the GPG key used to sign the MariaDB packages. | str | no | https://mirror.netcologne.de/mariadb/PublicKey |\n| `repository` | deb822 repository URL that will be added through `ansible.builtin.deb822_repository`. You can point this to an internal mirror if required. | str | no | http://mirror.netcologne.de/mariadb/repo/{{ mariadb.version }}/{{ ansible_facts['distribution'] | lower }} |\n\n#### Options for `mariadb.database_defaults`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `encoding` | Default character set handed to `community.mysql.mysql_db`. | str | no | utf8mb4 |\n| `collation` | Default collation for new databases. | str | no | utf8mb4_unicode_ci |\n\n#### Options for `mariadb.galera`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `cluster` | Enable Galera cluster orchestration. | bool | no | False |\n| `initializer` | Flag the current node as the bootstrap/seed node. | bool | no | False |\n| `arbitrator` | Configure the host as a garbd arbitrator instead of a full data node. | bool | no | False |\n| `join` | Tuning knobs for cluster join/health checks (used by `has_joined_cluster.sh`). | dict of 'join' options | no | {} |\n\n#### Options for `mariadb.galera.join`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `max_wait` | Total time in seconds to wait for a node to become ready. | int | no | 300 |\n| `check_pause` | Sleep interval (seconds) between readiness checks. | int | no | 1 |\n\n#### Options for `mariadb.backup`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `enabled` | Enables the backup script/timer globally. Databases can override this flag individually via `mariadb.databases.\u003cname\u003e.backup.enabled`. | bool | no | False |\n| `timer` | Raw content injected into the `[Timer]` section of `mariadb-backup.timer`. | str | no | OnCalendar=*-*-* 00:00:00\nRandomizedDelaySec=6h |\n| `mysqldump` | Ordered dictionary of command-line fragments used to build the mysqldump command. Keys are only used for sorting; values are literal CLI arguments. | dict | no | {\"0\": \"mysqldump\", \"50_single_transaction\": \"--single-transaction\"} |\n| `structure_only` | Mapping of table names to booleans; tables set to `true` are exported using `--no-data`. | dict | no |  |\n| `compression` | Controls compression of dump files. | dict of 'compression' options | no | {} |\n| `dest` | Directory on the target host where dump files are written (permanent location). | str | no | /var/mariadb-backups |\n| `send_application_event` | Enables writing structured metrics into `application_event_log` after each backup run. | bool | no | False |\n| `application_event_log` | Path to the log file that captures backup metrics when `send_application_event` is enabled. | str | no | /var/log/application_events/MariaDB-Backup.log |\n\n#### Options for `mariadb.backup.compression`\n\n|Option|Description|Type|Required|Default|\n|---|---|---|---|---|\n| `enabled` | Whether to pipe mysqldump output through the compression command. | bool | no | True |\n| `command` | Binary executed when `compression.enabled` is true. | str | no | gzip |\n| `extension` | File suffix appended to compressed dumps. | str | no | gz |\n\n## Dependencies\nNone.\n\n## Installation\nAdd this role to the requirements.yml of your playbook as follows:\n```yaml\nroles:\n  - name: ansible-proserver-mariadb\n    src: https://github.com/punktDe/ansible-proserver-mariadb\n```\n\nAfterwards, install the role by running `ansible-galaxy install -r requirements.yml`\n\n## Example Playbook\n\n```yaml\n- hosts: all\n  roles:\n    - name: mariadb\n```\n\n\u003c!-- END_ANSIBLE_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunktde%2Fansible-proserver-mariadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpunktde%2Fansible-proserver-mariadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunktde%2Fansible-proserver-mariadb/lists"}