ansible-base/fenris/default/roles/postgresql-for-authelia/tasks/main.json

50 lines
1 KiB
JSON
Raw Normal View History

[
{
2024-03-19 18:45:32 +01:00
"name": "packages",
"become": true,
"ansible.builtin.apt": {
"update_cache": true,
"pkg": [
"acl",
"python3-psycopg2"
]
}
},
{
2024-03-19 18:45:32 +01:00
"name": "user",
"become": true,
"become_user": "postgres",
"community.postgresql.postgresql_user": {
"state": "present",
2024-03-19 18:45:32 +01:00
"name": "{{var_postgresql_for_authelia_username}}",
"password": "{{var_postgresql_for_authelia_password}}"
},
"environment": {
"PGOPTIONS": "-c password_encryption=scram-sha-256"
}
},
{
2024-03-19 18:45:32 +01:00
"name": "schema",
"become": true,
"become_user": "postgres",
"community.postgresql.postgresql_db": {
"state": "present",
2024-03-19 18:45:32 +01:00
"name": "{{var_postgresql_for_authelia_schema}}",
"owner": "{{var_postgresql_for_authelia_username}}"
}
},
{
2024-03-19 18:45:32 +01:00
"name": "rights",
"become": true,
"become_user": "postgres",
"community.postgresql.postgresql_privs": {
"state": "present",
2024-03-19 18:45:32 +01:00
"db": "{{var_postgresql_for_authelia_schema}}",
"objs": "ALL_IN_SCHEMA",
2024-03-19 18:45:32 +01:00
"roles": "{{var_postgresql_for_authelia_username}}",
"privs": "ALL",
"grant_option": true
}
}
]