Member-only story
Allow md5 Connection for a PostgreSQL User / Role — Ansible module postgresql_pg_hba
How to automate the creation of a PostgreSQL authentication file pg_hba.conf to allow the “myuser” user/role to connect using md5 authentication on PostgreSQL using Ansible Playbook and postgresql_pg_hba module.
4 min readJun 9, 2022
How to Allow md5 Connection for a PostgreSQL User / Role 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 Allow md5 Connection for a PostgreSQL User / Role
community.postgresql.postgresql_pg_hba
- Add, remove or modify a rule in a pg_hba file
Let’s talk about the Ansible module `postgresql_pg_hba
`.
The full name is `community.postgresql.postgresql_pg_hba
`, which means that is part of the collection of modules “community.postgresql
” maintained by the Ansible Community to interact with PostgreSQL.