feat: Added user with backup permissions only

This commit is contained in:
Oleksandr Stepanov
2024-11-27 14:51:33 +01:00
parent c5ab63672b
commit 46e2a6e0e4
2 changed files with 13 additions and 0 deletions

View File

@ -64,6 +64,9 @@ postgres_replica_user_password: ""
postgres_replica_auth_method: "scram-sha-256"
postgres_replication_bind_address: ""
postgres_replica_address: ""
backup_db_user: ""
backup_db_password: ""
backup_db_name: ""
# Enable TLS for traefik
enable_tls: false

View File

@ -40,3 +40,13 @@
login_user: "{{ database_username }}"
login_password: "{{ database_password }}"
query: "SELECT pg_reload_conf()"
- name: Create postgres replication user
community.postgresql.postgresql_user:
login_host: "{{ postgres_replication_bind_address }}"
login_user: "{{ database_username }}"
login_password: "{{ database_password }}"
name: "{{ backup_db_user }}"
password: "{{ backup_db_password }}"
db: "{{ backup_db_name }}"
priv: "pg_read_all_data"