No description
Find a file
Jesus Alejandro Sanchez Davila 1993dbbeb2 Improvements and bug fixes
2026-08-30 23:16:56 +02:00
.ansible/collections/ansible_collections/silvarion/databases Updates and improvements to follow ansible guidelines 2026-08-29 21:59:21 +02:00
changelogs Pre-test commit 2026-03-22 13:15:23 +01:00
playbooks Updates and improvements to follow ansible guidelines 2026-08-29 21:59:21 +02:00
roles Improvements and bug fixes 2026-08-30 23:16:56 +02:00
AGENT.md Added MariaDB role and updated MD files 2026-08-14 14:26:28 +02:00
CHANGELOG.rst Pre-test commit 2026-03-22 13:15:23 +01:00
galaxy.yml Pre-test commit 2026-03-22 13:15:23 +01:00
README.md Added MariaDB role and updated MD files 2026-08-14 14:26:28 +02:00

silvarion.databases

Ansible collection providing standardized, production-oriented roles for installing and managing databases on Linux: MySQL, MariaDB, PostgreSQL, Redis, and ProxySQL.

Every database role follows the same shape — vendor-repo installation, <role>_config_* configuration variables, user/role management, a Prometheus exporter, and scheduled backups — so once you know one role, you know how to operate the others. See AGENT.md for the conventions all roles share, and each role's own AGENT.md for what's specific to it.

Roles

Role Status Description
mysql Implemented MySQL Community Server, GTID replication, xtrabackup
mariadb Implemented MariaDB Server, GTID replication, mariabackup
pgsql Implemented PostgreSQL, pg_basebackup
redis Implemented Redis with ACL users, RDB backups
proxysql Implemented ProxySQL query router, standalone or clustered

Requirements

  • Ansible >= 2.14
  • Collection dependencies vary per role — see each role's README for the exact community.* collections it needs (community.mysql, community.postgresql, community.proxysql, community.general).
  • Supported platforms: RHEL/Rocky/AlmaLinux 9, Ubuntu 22.04 (jammy) / 24.04 (noble), Debian 12 (bookworm) — ProxySQL currently supports RHEL 9 and Ubuntu only.

Installation

ansible-galaxy collection install silvarion.databases

Usage

Reference a role by its fully-qualified collection name (FQCN):

- hosts: db_servers
  roles:
    - role: silvarion.databases.mysql
      vars:
        mysql_bootstrap: true
        mysql_root_pswd: "{{ lookup('community.hashi_vault.hashi_vault', 'secret/db/mysql:root_password') }}"
        mysql_owner_name: myapp
        mysql_owner_host: "%"
        mysql_owner_pswd: "{{ lookup('community.hashi_vault.hashi_vault', 'secret/db/mysql:owner_password') }}"

Each role documents its own required variables, tags, and example playbooks in its README — start there for the specifics of the database you're deploying.

Core Principles

  • Keep it simple — code stays as readable and straightforward as possible; no abstraction that doesn't earn its complexity.
  • Keep it clear — consistent naming and structure across roles, so a contributor who understands one role feels at home in another.
  • Keep it working — no unannounced downtime; any task that stops a running service says so explicitly in its name and, where relevant, a comment.
  • Keep it secure — no passwords, secrets, or tokens in the repository; credentials always come from a secrets manager via a lookup plugin.

Playbooks

Collection-level example playbooks live under playbooks/.

Contributing

Feel free to open an issue or contact the maintainer to collaborate.

Support

Feel free to create issues on the project or contact the maintainer directly.

Authors and acknowledgment

Author: Jesus Alejandro Sanchez Davila

Maintainer: Jesus Alejandro Sanchez Davila

Email: jsanchez.consultant@gmail.com

License

MIT