Existing Ansible Modules and Roles for MariaDB
This page contains links to modules and roles that can be used to automate MariaDB deployment and configuration. The list is not meant to be exhaustive. Use it as a starting point, but then please do your own research.
At the time time of this writing, there are no MariaDB-specific modules in Ansible Galaxy. MySQL modules can be used. Trying to use MySQL-specific features may result in errors or unexpected behaviour. However, the same applies when trying to use a feature not supported by the MySQL version in use.
Currently, the MySQL collection in Ansible Galaxy contains at least the following modules:
- mysql_db: manages MySQL databases.
- mysql_info: gathers information about a MySQL server.
- mysql_query: runs SQL queries against MySQL.
- mysql_replication: configures and operates asynchronous replication.
- mysql_user: creates, modifies and deletes MySQL users.
- mysql_variables: manages MySQL configuration.
Note that some modules only exist as shortcuts, and it is possible to use mysql_query instead. However, it is important to notice that mysql_query is not idempotent. Ansible does not understand MySQL queries, therefore it cannot check wether a query needs to be run or not.
Content initially contributed by Vettabase Ltd.