From 2eb2b1f6d46acaf83e3018903f33c4f8174b976d Mon Sep 17 00:00:00 2001 From: Oleksandr Stepanov Date: Wed, 27 Nov 2024 15:12:12 +0100 Subject: [PATCH] feat: Added user with backup permissions only --- tasks/replication.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/replication.yml b/tasks/replication.yml index 7a82571..01d9a4d 100644 --- a/tasks/replication.yml +++ b/tasks/replication.yml @@ -49,8 +49,11 @@ name: "{{ backup_db_user }}" password: "{{ backup_db_password }}" -- name: Grant role read_only to alice and bob +- name: Grant role pg_read_all_data to backup user community.postgresql.postgresql_membership: + login_host: "{{ postgres_replication_bind_address }}" + login_user: "{{ database_username }}" + login_password: "{{ database_password }}" group: pg_read_all_data target_roles: - "{{ backup_db_user }}"