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

Commit

Permalink
Merge pull request #9 from UCL-MIRSG/Fix/conf-defaults-8
Browse files Browse the repository at this point in the history
Fix/conf defaults 8
  • Loading branch information
drmatthews authored Apr 28, 2023
2 parents 61ff1f8 + 599ea00 commit 78e404b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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

0 comments on commit 78e404b

Please sign in to comment.