PostgreSQL is something of a special case on Ansible, as it has more native modules to support database activities than most other databases. Let's consider an example case: performing a vacuum on the sales.creditcard table in the publicly available AdventureWorks sample database (available here: https://github.com/lorint/AdventureWorks-for-Postgres).
Routine maintenance on PostgreSQL with Ansible
Vacuuming is a PostgreSQL-specific maintenance process and one that you might want to consider running on a regular basis, especially if your tables have a lot of deletes or modifications. Although a full discussion of this is beyond the scope of this book, it is important to consider that tables that are subject to these activities can become bloated ...
Get Hands-On Enterprise Automation on Linux now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.