add options to restrict source ips in pg_hba.conf

This commit is contained in:
nd 2022-10-02 13:18:47 +02:00
parent 18befd9978
commit 5ea5230644
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 2 additions and 1 deletions

View file

@ -6,5 +6,6 @@ postgresql:
max_connections: 100 max_connections: 100
shared_buffers: 128MB shared_buffers: 128MB
allowed_hosts: {} allowed_hosts: {}
listen_addresses: 'localhost'
dbs: {} dbs: {}
users: {} users: {}

View file

@ -1,7 +1,7 @@
{% for group in postgresql.allowed_hosts %} {% for group in postgresql.allowed_hosts %}
# {{ group }} # {{ group }}
{% for item in postgresql.allowed_hosts[group] %} {% for item in postgresql.allowed_hosts[group] %}
{{ item.type | default('host') }} {{ item.database | default('all') }} {{ item.user | default('all') }} {{ item.auth | default('md5') }} {{ item.type | default('host') }} {{ item.database | default('all') }} {{ item.user | default('all') }} {{ item.source_net | default('all') }} {{ item.auth | default('md5') }}
{% endfor %} {% endfor %}