From cb09bca26e9357ff1733dd84c42a0a3a77a29f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Wed, 20 Mar 2024 00:08:53 +0100 Subject: [PATCH] =?UTF-8?q?[mod]=20role:postgresql:Integer-Wert=20f=C3=BCr?= =?UTF-8?q?=20Port=20verwenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/roles/postgresql/defaults/main.json | 2 +- .../roles/postgresql/templates/postgresql.conf.j2 | 2 +- ansible/roles/postgresql/vardef.json | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 ansible/roles/postgresql/vardef.json diff --git a/ansible/roles/postgresql/defaults/main.json b/ansible/roles/postgresql/defaults/main.json index abd9af3..ff00ca2 100644 --- a/ansible/roles/postgresql/defaults/main.json +++ b/ansible/roles/postgresql/defaults/main.json @@ -1,5 +1,5 @@ { "var_postgresql_listen_address": "localhost", - "var_postgresql_port": "5432" + "var_postgresql_port": 5432 } diff --git a/ansible/roles/postgresql/templates/postgresql.conf.j2 b/ansible/roles/postgresql/templates/postgresql.conf.j2 index 1b5c664..3b2847f 100644 --- a/ansible/roles/postgresql/templates/postgresql.conf.j2 +++ b/ansible/roles/postgresql/templates/postgresql.conf.j2 @@ -61,7 +61,7 @@ listen_addresses = '{{var_postgresql_listen_address}}' # what IP address(es) to # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) -port = {{var_postgresql_port}} # (change requires restart) +port = {{var_postgresql_port | string}} # (change requires restart) max_connections = 100 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories diff --git a/ansible/roles/postgresql/vardef.json b/ansible/roles/postgresql/vardef.json new file mode 100644 index 0000000..0fc124f --- /dev/null +++ b/ansible/roles/postgresql/vardef.json @@ -0,0 +1,15 @@ +{ + "listen_address": { + "mandatory": false, + "type": "string" + }, + "port": { + "mandatory": false, + "type": "integer" + }, + "allow_md5_auth": { + "mandatory": false, + "type": "boolean" + } +} +