[add] role:postgresql-for-authelia

This commit is contained in:
Christian Fraß 2024-03-19 18:45:32 +01:00
parent 944f75de59
commit b658f3057c
3 changed files with 39 additions and 10 deletions

View file

@ -0,0 +1,7 @@
{
"var_postgresql_for_authelia_host": "localhost",
"var_postgresql_for_authelia_port": 5432,
"var_postgresql_for_authelia_username": "authelia_user",
"var_postgresql_for_authelia_password": "REPLACE_ME",
"var_postgresql_for_authelia_schema": "authelia"
}

View file

@ -1,6 +1,6 @@
[
{
"name": "database:postgresql | packages",
"name": "packages",
"become": true,
"ansible.builtin.apt": {
"pkg": [
@ -10,34 +10,34 @@
}
},
{
"name": "database:postgresql | user",
"name": "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": "{{var_postgresql_for_authelia_username}}",
"password": "{{var_postgresql_for_authelia_password}}"
}
},
{
"name": "database:postgresql | schema",
"name": "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": "{{var_postgresql_for_authelia_schema}}",
"owner": "{{var_postgresql_for_authelia_username}}"
}
},
{
"name": "database:postgresql | rights",
"name": "rights",
"become": true,
"become_user": "postgres",
"community.postgresql.postgresql_privs": {
"state": "present",
"db": "{{var_authelia_storage_data_postgresql_schema}}",
"db": "{{var_postgresql_for_authelia_schema}}",
"objs": "ALL_IN_SCHEMA",
"roles": "{{var_authelia_storage_data_postgresql_username}}",
"roles": "{{var_postgresql_for_authelia_username}}",
"privs": "ALL",
"grant_option": true
}

View file

@ -0,0 +1,22 @@
{
"host": {
"mandatory": false,
"type": "string"
},
"port": {
"mandatory": false,
"type": "integer"
},
"username": {
"mandatory": false,
"type": "string"
},
"password": {
"mandatory": true,
"type": "string"
},
"schema": {
"mandatory": false,
"type": "string"
}
}