updated postgresql state
This commit is contained in:
parent
7bdc08222d
commit
ea6fa77944
@ -4,7 +4,6 @@ postgresql:
|
||||
- pgpool2
|
||||
- postgresql-13
|
||||
- postgresql-13-cron
|
||||
- postgresql-13-pgpool2
|
||||
- postgresql-13-repmgr
|
||||
- postgresql-client-13
|
||||
- repmgr
|
||||
|
@ -1,36 +1,25 @@
|
||||
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||
{%- from "postgresql/map.jinja" import net with context %}
|
||||
|
||||
### Replication via repmgr
|
||||
local replication repmgr trust
|
||||
{%- for key, value in net.ipv4_networks.items() %}
|
||||
host replication repmgr {{ value.ip }}/{{ value.mask }} trust # {{ key }}
|
||||
{% for user in ['repmgr','replication'] %}
|
||||
local {{ user }} repmgr trust
|
||||
{%- for network in net.ip_networks %}
|
||||
host {{ user }} repmgr {{ network }} trust
|
||||
{%- endfor %}
|
||||
{%- for key, value in net.ipv6_networks.items() %}
|
||||
host replication repmgr {{ value.ip }}/{{ value.mask }} trust # {{ key }}
|
||||
{%- endfor %}
|
||||
|
||||
local repmgr repmgr trust
|
||||
{%- for key, value in net.ipv4_networks.items() %}
|
||||
host repmgr repmgr {{ value.ip }}/{{ value.mask }} trust # {{ key }}
|
||||
{%- endfor %}
|
||||
{%- for key, value in net.ipv6_networks.items() %}
|
||||
host repmgr repmgr {{ value.ip }}/{{ value.mask }} trust # {{ key }}
|
||||
{%- endfor %}
|
||||
|
||||
### Basic auth for users
|
||||
{%- for key, value in net.ipv4_networks.items() %}
|
||||
host all all {{ value.ip }}/{{ value.mask }} md5 # {{ key }}
|
||||
{%- endfor %}
|
||||
{%- for key, value in net.ipv6_networks.items() %}
|
||||
host all all {{ value.ip }}/{{ value.mask }} md5 # {{ key }}
|
||||
{%- for network in net.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
|
||||
|
Loading…
Reference in New Issue
Block a user