paulbsd-salt/states/postgresql/templates/pg_hba.conf.j2

29 lines
959 B
Plaintext
Raw Normal View History

2022-07-27 23:49:02 +02:00
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "postgresql/map.jinja" import net with context %}
2023-03-10 00:06:07 +01:00
{% for user in ['repmgr','replication'] %}
local {{ user }} repmgr trust
{%- for network in net.ip_networks %}
host {{ user }} repmgr {{ network }} trust
2022-07-27 23:49:02 +02:00
{%- endfor %}
{%- endfor %}
### Basic auth for users
2023-03-10 00:06:07 +01:00
{%- for network in net.ip_networks %}
host all all {{ network }} md5
2022-07-27 23:49:02 +02:00
{%- endfor %}
2024-08-03 08:20:40 +02:00
{%- for network in net.optional_ip_networks %}
host all all {{ network }} md5
{%- endfor %}
2022-07-27 23:49:02 +02:00
2023-03-10 00:06:07 +01:00
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