paulbsd-salt/states/postgresql/templates/pg_hba.conf.j2
Paul dc2f262fa2
All checks were successful
continuous-integration/drone Build is passing
updated postgresql state
2024-08-03 08:20:40 +02:00

29 lines
959 B
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "postgresql/map.jinja" import net with context %}
{% for user in ['repmgr','replication'] %}
local {{ user }} repmgr trust
{%- for network in net.ip_networks %}
host {{ user }} repmgr {{ network }} trust
{%- endfor %}
{%- endfor %}
### Basic auth for users
{%- for network in net.ip_networks %}
host all all {{ network }} md5
{%- endfor %}
{%- for network in net.optional_ip_networks %}
host all all {{ network }} md5
{%- endfor %}
local all postgres peer
local all all peer
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5