From 4ae3bbc92f1a20df4cb32516356b5069a64bdf80 Mon Sep 17 00:00:00 2001 From: Andrii Date: Fri, 6 Dec 2024 16:12:01 +0200 Subject: [PATCH] fix --- ansible1/roles/postgresql/tasks/main.yml | 6 ++++-- ansible1/roles/postgresql/vars/main.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible1/roles/postgresql/tasks/main.yml b/ansible1/roles/postgresql/tasks/main.yml index d8dbee157..ab04fbebb 100644 --- a/ansible1/roles/postgresql/tasks/main.yml +++ b/ansible1/roles/postgresql/tasks/main.yml @@ -61,9 +61,11 @@ - name: Configure PostgreSQL. Set hosts in pg_hba.conf template: - src: pg_hba.conf.j2 + src: "pg_hba.conf.j2" dest: "/etc/postgresql/{{ postgres_version }}/main/pg_hba.conf" - backup: yes + owner: "{{ postgres_user }}" + group: "{{ postgres_group }}" + mode: 0600 notify: restart postgresql become: yes diff --git a/ansible1/roles/postgresql/vars/main.yml b/ansible1/roles/postgresql/vars/main.yml index f907305e8..0ab5991d8 100644 --- a/ansible1/roles/postgresql/vars/main.yml +++ b/ansible1/roles/postgresql/vars/main.yml @@ -1,5 +1,6 @@ --- postgres_user: "postgres" +postgres_group: postgres postgres_db_development_name: "zero_waste_development" postgres_db_test_name: "zero_waste_test" postgres_version: 12