File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
automation/roles/patroni/templates Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 8585
8686# TYPE DATABASE USER ADDRESS METHOD
8787{% for client in postgresql_pg_hba %}
88- {{ client.type.ljust(9) |default('{% if tls_cert_generate | default(false) | bool %}hostssl{% else %}host{% endif % }') }} {{ client.database.ljust(24) |default('all') }} {{ client.user.ljust(24) |default('all') }} {{ client.address.ljust(24) |default('') }} {{ client.method |default('md5') }} {{ client.options |default(None) }}
88+ {{ client.type.ljust(9) |default('{{ host_type } }') }} {{ client.database.ljust(24) |default('all') }} {{ client.user.ljust(24) |default('all') }} {{ client.address.ljust(24) |default('') }} {{ client.method |default('md5') }} {{ client.options |default(None) }}
8989{% endfor %}
9090{% for host in pg_hba_hosts | default (groups ['postgres_cluster' ] | default ([])) %}
91- {% if tls_cert_generate | default ( false ) | bool %} hostssl {% else %} host {% endif % } all all {{ hostvars[host] ['patroni_bind_address'] | default(hostvars[host] ['bind_address'] , true) }}/32 {{ postgresql_password_encryption_algorithm }}
91+ {{ host_type } } all all {{ hostvars[host] ['patroni_bind_address'] | default(hostvars[host] ['bind_address'] , true) }}/32 {{ postgresql_password_encryption_algorithm }}
9292{% endfor %}
9393# Allow replication connections from localhost, by a user with the
9494# replication privilege.
9595{% if patroni_use_unix_socket_repl | default (false ) %}
9696 local replication {{ patroni_replication_username }} trust
9797{% else %}
98- {% if tls_cert_generate | default ( false ) | bool %} hostssl {% else %} host {% endif % } replication {{ patroni_replication_username }} localhost trust
98+ {{ host_type } } replication {{ patroni_replication_username }} localhost trust
9999{% endif %}
100100{% for host in pg_hba_hosts | default (groups ['postgres_cluster' ] | default ([])) %}
101- {% if tls_cert_generate | default ( false ) | bool %} hostssl {% else %} host {% endif % } replication {{ patroni_replication_username }} {{ hostvars[host] ['patroni_bind_address'] | default(hostvars[host] ['bind_address'] , true) }}/32 {{ postgresql_password_encryption_algorithm }}
101+ {{ host_type } } replication {{ patroni_replication_username }} {{ hostvars[host] ['patroni_bind_address'] | default(hostvars[host] ['bind_address'] , true) }}/32 {{ postgresql_password_encryption_algorithm }}
102102{% endfor %}
You can’t perform that action at this time.
0 commit comments