Skip to main content

Mariadb Role

Install and manage the MariaDB server, databases, and users.


Variables​

VariableTypeOptionsDefaultDescription
mariadb_service_namestring---mariadb.servicesystemd service unit name
mariadb_service_statestringreloaded, restarted, started, stoppedstarteddesired state of the mariadb service
mariadb_service_enabledbooltrue, falsetruewhether the mariadb service is enabled at boot
mariadb_package_statestringpresent, absent, latestpresentdesired state of mariadb packages
mariadb_packagelist of string---["mariadb","mariadb-server","python3-mysqlclient"]list of packages to install
mariadb_databasestring---defaultdatabase name to manage
mariadb_database_encodingstring---utf8database character encoding (e.g. utf8mb4)
mariadb_database_collationstring---""database collation (e.g. utf8mb4_unicode_ci)
mariadb_database_statestringpresent, absent, skippresentdesired state of the database
mariadb_userstring---{{ ansible_user }}database username
mariadb_user_passwordstring---changemedatabase user password
mariadb_user_databasestring---{{ mariadb_database }}database to grant user access to
mariadb_user_privilegesstring---ALLSQL privileges string (e.g. ALL ON db.*)
mariadb_user_statestringpresent, absent, skippresentdesired state of the database user
mariadb_firewalld_zonestring---firewall zone for mariadb rules
mariadb_firewalld_servicestring---mysqlfirewall service name
mariadb_firewalld_statestringpresent, absent, enabled, disabled, skipenableddesired state of firewall rules