From 4569217a8437b76d856625a8af5084e947aa3684 Mon Sep 17 00:00:00 2001 From: Stefan Jakobs Date: Wed, 4 Dec 2019 10:27:59 +0100 Subject: [PATCH] allow vars files to ship a default unix socket dir mode --- defaults/main.yml | 2 +- tasks/configure.yml | 4 +++- vars/Fedora-31.yml | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0783996..6764563 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,7 +13,7 @@ postgresql_group: postgres postgresql_unix_socket_directories: - /var/run/postgresql -postgresql_unix_socket_directories_mode: '02755' +# postgresql_unix_socket_directories_mode: '02775' postgresql_service_state: started postgresql_service_enabled: true diff --git a/tasks/configure.yml b/tasks/configure.yml index bcbc0fb..993a3af 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -24,5 +24,7 @@ state: directory owner: "{{ postgresql_user }}" group: "{{ postgresql_group }}" - mode: "{{ postgresql_unix_socket_directories_mode }}" + mode: "{{ postgresql_unix_socket_directories_mode + |default(__postgresql_unix_socket_directories_mode + |default('02775')) }}" with_items: "{{ postgresql_unix_socket_directories }}" diff --git a/vars/Fedora-31.yml b/vars/Fedora-31.yml index 1638a6a..27a023e 100644 --- a/vars/Fedora-31.yml +++ b/vars/Fedora-31.yml @@ -9,5 +9,6 @@ __postgresql_packages: - postgresql-server - postgresql-contrib - postgresql-libs +__postgresql_unix_socket_directories_mode: '0755' # Fedora 31 containers only have python3 by default postgresql_python_library: python3-psycopg2