lab-ansible/roles/postgresql/templates/pg_hba.conf.j2
2023-12-23 17:41:57 +01:00

13 lines
657 B
Django/Jinja

# THIS FILE IS MANAGED BY ANSIBLE
# code: language=ansible-jinja
# TYPE DATABASE USER ADDRESS METHOD
local all all scram-sha-256
local all postgres peer
host all all 127.0.0.1/32 scram-sha-256
host all all ::1/128 scram-sha-256
{% for db in (databases | dict2items(key_name='name', value_name='vars')) %}
host {{ db.name }} {{ db.vars.username }} {{ internal_subnet }} scram-sha-256
{% endfor %}