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