[mod] role:authelia:Neben-Task für PostgreSQL-Einrichtung
This commit is contained in:
parent
07a681b435
commit
dc219168df
2 changed files with 52 additions and 0 deletions
45
ansible/roles/authelia/tasks/database-postgresql.json
Normal file
45
ansible/roles/authelia/tasks/database-postgresql.json
Normal file
|
@ -0,0 +1,45 @@
|
|||
[
|
||||
{
|
||||
"name": "database:postgresql | packages",
|
||||
"become": true,
|
||||
"ansible.builtin.apt": {
|
||||
"pkg": [
|
||||
"acl",
|
||||
"python3-psycopg2"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database:postgresql | user",
|
||||
"become": true,
|
||||
"become_user": "postgres",
|
||||
"community.postgresql.postgresql_user": {
|
||||
"state": "present",
|
||||
"name": "{{var_authelia_storage_data_postgresql_username}}",
|
||||
"password": "{{var_authelia_storage_data_postgresql_password}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database:postgresql | schema",
|
||||
"become": true,
|
||||
"become_user": "postgres",
|
||||
"community.postgresql.postgresql_db": {
|
||||
"state": "present",
|
||||
"name": "{{var_authelia_storage_data_postgresql_schema}}",
|
||||
"owner": "{{var_authelia_storage_data_postgresql_username}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database:postgresql | rights",
|
||||
"become": true,
|
||||
"become_user": "postgres",
|
||||
"community.postgresql.postgresql_privs": {
|
||||
"state": "present",
|
||||
"db": "{{var_authelia_storage_data_postgresql_schema}}",
|
||||
"objs": "ALL_IN_SCHEMA",
|
||||
"roles": "{{var_authelia_storage_data_postgresql_username}}",
|
||||
"privs": "ALL",
|
||||
"grant_option": true
|
||||
}
|
||||
}
|
||||
]
|
|
@ -37,6 +37,13 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "database",
|
||||
"when": "var_authelia_storage_kind == 'postgresql'",
|
||||
"ansible.builtin.include_tasks": {
|
||||
"file": "database-postgresql.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "generate private key for signing OIDC JWTs",
|
||||
"become": true,
|
||||
|
|
Loading…
Add table
Reference in a new issue