This ansible role configures a mariadb server.
An apt based packagmanager and systemd
Read the mariadb doc to get to know what vars can be set.
Additionally, these variables can be set:
List of database names
Dict of users. Each key is a username and the value is a dict with up to three keys:
password
- Optional passwordhost
- Optional host which the user can access the DB fromprivileges
- Ansible-style MariaDB privilege configuration
hosts: wordpress
roles:
- role: mariadb
mariadb_port: 3307
mariadb_socket: /tmp/mariadb.sock
mariadb_ensure_databases:
- wordpress
- example
mariadb_ensure_users:
wordpress:
password: wp
privileges: "wordpress.*:ALL"
admin:
privileges: "*.*:ALL"
public_account:
privileges: "public.*:ALL"
host: "192.168.1.%"
Sets up a running mariadb instance
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.