add ansible vars for app user and password

This commit is contained in:
Robert Kaussow 2024-08-13 09:47:50 +02:00
parent e340d11ad5
commit 9e7aa62e09
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,14 @@ postgres_user: postgres
postgres_password: postgres
postgres_db: postgres
# @var postgres_app_user:description: >
# Application user name without superuser privileges. Full access to `postgres_db`
# will be granted to this user.
# @end
# @var postgres_app_user:value: $ "_unset_"
# @var postgres_app_password:description: Application user password.
# @var postgres_app_password:value: $ "_unset_"
postgres_host_auth_method: scram-sha-256
postgres_initdb_args:
- --auth-host=scram-sha-256

View File

@ -2,6 +2,10 @@
{{ ansible_managed | comment }}
POSTGRES_USER={{ postgres_user }}
POSTGRES_PASSWORD={{ postgres_password }}
{% if postgres_app_user is defined and postgres_app_password is defined %}
POSTGRES_APP_USER={{ postgres_app_user }}
POSTGRES_APP_PASSWORD={{ postgres_app_password }}
{% enfif %}
POSTGRES_DB={{ postgres_db }}
{% if postgres_host_auth_method is defined %}