Existing Ansible Modules and Roles for MariaDB

You are viewing an old version of this article. View the current version here.

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.

Modules

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.

Roles


Content initially contributed by Vettabase Ltd.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.