diff --git a/roles/borgmatic/templates/borgmatic.d/config.yml.j2 b/roles/borgmatic/templates/borgmatic.d/config.yml.j2 index 6ea98ce..1b23cdd 100644 --- a/roles/borgmatic/templates/borgmatic.d/config.yml.j2 +++ b/roles/borgmatic/templates/borgmatic.d/config.yml.j2 @@ -69,7 +69,7 @@ hooks: postgresql_databases: {% for hook in borgmatic_hooks.postgresql_databases %} - name: {{ hook.name | default('all') }} - username: {{ hook.username | default('postgres') }} + username: {{ hook.username | default('root') }} format: {{ hook.format | default('custom') }} {% endfor %} {% endif %} diff --git a/roles/mailserver_database/tasks/main.yml b/roles/mailserver_database/tasks/main.yml index 3bc3d31..937b442 100644 --- a/roles/mailserver_database/tasks/main.yml +++ b/roles/mailserver_database/tasks/main.yml @@ -9,6 +9,14 @@ - python3-psycopg2 - acl +- name: Create root postgresql superuser, needed for backups + become: true + become_user: postgres + community.postgresql.postgresql_user: + name: root + state: present + role_attr_flags: SUPERUSER + - name: Create postgresql users become: true become_user: postgres