Skip to content
 
 

Repository files navigation

MySQL collection for Ansible

Plugins CI Codecov Discuss on Matrix at #mysql:ansible.com

This collection is a part of the Ansible package.

Important

For MariaDB automation, use the ansible.mariadb collection instead! If you already use this collection with MariaDB, please change FQCNs in tasks in your playbooks, for example, ansible.mysql.mysql_info to ansible.mariadb.mariadb_info. No other changes are needed. This collection was cloned to the ansible.mariadb collection to allow its contributors and maintainers to focus on MariaDB-related automation development. This ansible.mysql collection still supports MariaDB (only bugfixes and security fixes) until release 6.0.0 (not earlier than mid 2027), then its support will be dropped!

Our mission

The Ansible ansible.mysql collection goals are to produce and maintain simple, flexible, and powerful open-source software for automating MySQL related tasks providing good documentation for easy deployment and use.

Community standards

This project abides by the following policies:

Communication

For more information about communication, see the Ansible communication guide.

Contributing

Important

To open issues/pull requests related only to MariaDB, do it in the ansible.mysql collection instead.

The content of this collection is made by people just like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

Any kind of contribution is very welcome.

You don't know how to start? Refer to our contribution guide or ask us in the #mysql:ansible.com room on Matrix!

Collection maintenance

The current maintainers (contributors with write or higher access) are listed in the MAINTAINERS file. If you have questions or need help, feel free to mention them in the proposals.

To learn how to maintain / become a maintainer of this collection, refer to the Maintainer guidelines.

It is necessary for maintainers of this collection to be subscribed to:

  • The collection itself (the Watch button -> All Activity in the upper right corner of the repository's homepage).
  • The "Changes Impacting Collection Contributors and Maintainers" issue.

They also should be subscribed to Ansible's The Bullhorn newsletter.

Governance

We, the MySQL team, use the forum posts tagged with mysql for general announcements and discussions.

The process of decision making in this collection is based on discussing and finding consensus among participants.

Every voice is important and every idea is valuable. If you have something on your mind, create an issue or dedicated forum discussion and let's discuss it!

Included content

Releases Support Timeline

We maintain each major release (1.x.y, 2.x.y, ...) for two years after the next major version is released.

Here is the table for the support timeline:

  • 1.x.y: released 2020-08-17, EOL
  • 2.x.y: released 2021-04-15, EOL
  • 3.x.y: released 2021-12-01, EOL
  • 4.x.y: released 2025-09-15, EOL 2028-05-05
  • 5.x.y: released 2026-05-05, current

Tested with

ansible-core

  • stable-2.16 (RHEL8 context only)
  • stable-2.17
  • stable-2.18
  • stable-2.19
  • stable-2.20
  • stable-2.21
  • current development version

Python

  • 3.8 (Unit tests only)
  • 3.9 (Unit tests only)
  • 3.10 (Sanity, Units and integrations tests)
  • 3.11 (Unit tests only, collection version >= 3.10.0)

Databases

For MariaDB, only Long Term releases are tested. When multiple LTS are available, we test the oldest and the newest only. Usually breaking changes introduced in the versions in between are also present in the latest version.

  • mysql 8.4.9
  • mysql 9.7.0
  • mariadb:10.11 (collection version >= 3.10.0)
  • mariadb:11.8 (collection version >= 4.0.1)

Database connectors

  • pymysql 0.10.1
  • pymysql 1.1.1
  • pymysql 1.2.0

External requirements

The MySQL modules rely on a PyMySQL connector.

The mysqlclient connector support has been deprecated - use PyMySQL connector instead! We will stop testing against it in collection version 4.0.0 and remove the related code in 5.0.0.

Using this collection

Installing the Collection from Ansible Galaxy

Before using the MySQL collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install ansible.mysql

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: ansible.mysql

Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically if you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install ansible.mysql --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax:

ansible-galaxy collection install ansible.mysql:==5.0.0

See Ansible Using collections for more details.

Support

If you obtained this collection from:

  • Ansible community package, Ansible Galaxy, or GitHub: open an issue in this repository or start a forum topic. See the Communication section for details.
  • Automation Hub: as Red Hat Ansible Certified Content, this collection is entitled to support through the Ansible Automation Platform (AAP) using the Create issue button on the top right corner.

Release notes

See the CHANGELOG.rst for all changes.

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

MySQL Ansible Collection

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages