Add Authentik SSO service and refactor Valkey configuration to use native tools and consolidated systemd service
This commit is contained in:
28
roles/authentik/tasks/database.yml
Normal file
28
roles/authentik/tasks/database.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
# Authentik Database Management - Self-Contained Database Setup
|
||||
|
||||
- name: Create Authentik database user
|
||||
postgresql_user:
|
||||
name: "{{ authentik_db_user }}"
|
||||
password: "{{ authentik_db_password }}"
|
||||
encrypted: yes
|
||||
become: yes
|
||||
become_user: postgres
|
||||
|
||||
- name: Create Authentik database
|
||||
postgresql_db:
|
||||
name: "{{ authentik_db_name }}"
|
||||
owner: "{{ authentik_db_user }}"
|
||||
encoding: UTF8
|
||||
template: template0
|
||||
become: yes
|
||||
become_user: postgres
|
||||
|
||||
- name: Grant all privileges on Authentik database to user
|
||||
postgresql_privs:
|
||||
db: "{{ authentik_db_name }}"
|
||||
privs: ALL
|
||||
type: database
|
||||
role: "{{ authentik_db_user }}"
|
||||
become: yes
|
||||
become_user: postgres
|
||||
Reference in New Issue
Block a user