From 30eb61c663220b4b4b8643e7d3209ee508f0b7e5 Mon Sep 17 00:00:00 2001 From: Daniel Matthews Date: Wed, 1 Mar 2023 18:25:25 +0000 Subject: [PATCH 1/2] Check that `data_directory` variables are different before creating symkink. --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index c45aeff..7edbf8c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -104,6 +104,7 @@ src: "{{ postgresql_storage.data_directory }}" dest: "{{ postgresql.data_directory }}" state: link + when: postgresql_storage.data_directory != postgresql.data_directory - name: Create PostgreSQL database directory if it does not already exist ansible.builtin.command: "{{ postgresql.setup_command }} initdb" From c87201a7dcedca92fc6bc3002d4c395f2fce82a4 Mon Sep 17 00:00:00 2001 From: Daniel Matthews Date: Wed, 1 Mar 2023 19:54:33 +0000 Subject: [PATCH 2/2] Fix default value for `listen_addresses`. --- templates/postgresql.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/postgresql.conf.j2 b/templates/postgresql.conf.j2 index 1146746..022f194 100644 --- a/templates/postgresql.conf.j2 +++ b/templates/postgresql.conf.j2 @@ -56,7 +56,7 @@ # - Connection Settings - -listen_addresses = {{ postgresql_connection.listen_addresses|default('localhost, postgresql_connection.host') }} +listen_addresses = {{ postgresql_connection.listen_addresses|default('localhost, ' + postgresql_connection.host) }} #listen_addresses = '*' # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all