run all backup tasks in a slice

This commit is contained in:
Jef Roosens 2026-04-20 21:53:11 +02:00
parent d351573a3b
commit 4c54a80122
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
6 changed files with 61 additions and 3 deletions

View file

@ -35,6 +35,15 @@
loop: "{{ backups }}"
when: item.user is defined
- name: Ensure backup slice unit is present
ansible.builtin.copy:
src: "backup.slice"
dest: "/etc/systemd/system/backup.slice"
owner: root
group: root
mode: "0644"
notify: Reload systemd
- name: Ensure systemd service unit is present for each backup
ansible.builtin.template:
src: "backup.service.j2"