Ansible Modules & Collections for Database Maintenance, Upgrade and Patching

Ansible has several modules and collections that can be used for database maintenance, upgrade, and patching tasks. However, please note that the landscape of Ansible modules and collections may have evolved since then. Always refer to the official Ansible documentation and the Ansible Galaxy website for the most up-to-date information. Here are some modules and collections that were relevant as of my last update:

Modules for Database Maintenance, Upgrade, and Patching:

  1. MySQL Modules:
    • mysql_db: Create, delete, or modify MySQL databases.
    • mysql_user: Manage MySQL users and their privileges.
    • mysql_replication: Manage MySQL replication configuration.
  2. PostgreSQL Modules:
    • postgresql_db: Manage PostgreSQL databases.
    • postgresql_user: Manage PostgreSQL users and their privileges.
  3. MongoDB Modules:
    • mongodb_user: Manage MongoDB users and their privileges.
    • mongodb_database: Manage MongoDB databases.
  4. Oracle Modules:
    • oracle_db: Manage Oracle databases (community-contributed module).
  5. Common Modules:
    • command and shell: Execute arbitrary commands and scripts, which can be used for running database maintenance scripts or custom tasks.
    • systemd: Manage the status of systemd services, useful for starting, stopping, or restarting database services.

Collections for Database Maintenance, Upgrade, and Patching:

  1. Community Collections:
    • PostgreSQL Collection: Includes various modules and roles for PostgreSQL database management, maintenance, and configuration.
    • MySQL Collection: Contains roles and modules for managing MySQL databases, users, and configurations.
    • MongoDB Collection: Provides roles and modules to manage MongoDB instances, databases, and users.
  2. Red Hat Collections:
    • redhat.rhsa_ansible_collections.os_linux: This collection includes modules and plugins for interacting with the Red Hat Security Data API to get information about security vulnerabilities and patches.

Database modules

Aerospike

Influxdb

Misc

Mongodb

Mssql

Mysql

Postgresql

Proxysql

Vertica

Oracle

  • https://galaxy.ansible.com/ari_stark/ansible_oracle_modules
  • https://github.com/oravirt/ansible-oracle-modules
  • https://github.com/oracle/oci-ansible-collection
  • https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/ansible.htm
  • https://github.com/oracle/oci-ansible-collection
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x