This commit is contained in:
2026-01-29 12:55:01 +01:00
commit 65edf17dc7
15 changed files with 435 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
- name: Create db user
become_user: postgres
postgresql_user:
name: mailuser
password: "{{ mailuser_password }}"
- name: Create database
become_user: postgres
postgresql_db:
name: mailarchiver
owner: mailuser
- name: Grant schema rights
become_user: postgres
postgresql_query:
db: mailarchiver
query: |
GRANT ALL ON SCHEMA public TO mailuser;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT ALL ON TABLES TO mailuser;