ansible-role-postgresql/templates/pg_hba.conf.j2

7 lines
358 B
Text
Raw Normal View History

2021-09-10 12:09:38 +00:00
# {{ ansible_managed }}
local all postgres peer
{% for conn in postgresql_hba %}
{{ conn.type }} {% if conn.databases == 'all' %}all{% else %}"{{ conn.databases|join('",') }}"{% endif %} {% if conn.users == 'all' %}all{% else %}"{{ conn.users|join('",') }}"{% endif %}{% if conn.type != 'local' %} {{ conn.subnet }}{%endif %} {{ conn.method }}
{% endfor %}