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

6 lines
392 B
Django/Jinja

# {{ ansible_managed }}
local all postgres peer
{% for conn in postgresql_hba %}
{{ conn.type }} {% if conn.databases in ['all', 'replication'] %}{{ conn.databases }}{% 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 %}