Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Fix/conf defaults 8 #9

Merged
merged 3 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions molecule/resources/inventory/host_vars/db/vars
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ postgresql_connection:
client_ip: "{{ web_vm.ip }}"
client_certificate_filename: "/var/lib/pgsql/certs/root.crt" # required if using SSL, where to copy the client certificate to on the server
listen_addresses: "'*'"
subnet_mask: 255.255.255.255

# mirsg.ssl_certificates - postgresql server
postgresql_ssl_certificate:
Expand Down
4 changes: 2 additions & 2 deletions templates/pg_hba.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ local all all peer

# IPv4 local connections:
{% if postgresql_use_ssl %}
hostssl {{ postgresql_database.database_name }} {{ postgresql_database.user_name }} {{ postgresql_connection.client_ip }} {{ postgresql_connection.subnet_mask|default('255.255.255.255') }} md5 clientcert=1
hostssl {{ postgresql_database.database_name }} {{ postgresql_database.user_name }} {{ postgresql_connection.client_ip }} {{ postgresql_connection.subnet_mask }} md5 clientcert=1
{% else %}
host {{ postgresql_database.database_name }} {{ postgresql_database.user_name }} {{ postgresql_connection.client_ip }} {{ postgresql_connection.subnet_mask|default('255.255.255.255') }} md5
host {{ postgresql_database.database_name }} {{ postgresql_database.user_name }} {{ postgresql_connection.client_ip }} {{ postgresql_connection.subnet_mask }} md5
{% endif %}
2 changes: 1 addition & 1 deletion templates/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# - Connection Settings -

listen_addresses = {{ postgresql_connection.listen_addresses|default('localhost, ' + postgresql_connection.host) }}
listen_addresses = {{ postgresql_connection.listen_addresses }}
#listen_addresses = '*'
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
Expand Down