Member-only story
Rename a PostgreSQL Database — Ansible module postgresql_db
How to automate the renaming from “testdb” database to “exampledb” on PostgreSQL using Ansible Playbook and postgresql_db module.
How to Rename a PostgreSQL Database with Ansible?
I’m going to show you a live demo with some simple Ansible code.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Ansible Rename a PostgreSQL Database
- `
community.postgresql.postgresql_db
` - Add or remove PostgreSQL databases from a remote host
Let’s talk about the Ansible module `postgresql_db
`.
The full name is `community.postgresql.postgresql_db
`, which means that is part of the collection of modules “community.postgresql
” maintained by the Ansible Community to interact with PostgreSQL.
The collection is tested with `ansible-core` version 2.11+, prior versions such as 2.9 or 2.10 are not supported.
The purpose of the module is to add or remove PostgreSQL databases from a remote host.