Copy per-host files of kopia_backup from a files list, empty by default

This commit is contained in:
2026-10-22 08:25:43 +00:00
parent bd24f01110
commit bcdc460297
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -20,6 +20,8 @@ kopia_backup:
# Database dumps written to /var/backups/dumps before the snapshot, which then includes that directory.
# Each item: file, container, command (run with sh -c inside the container, output is the dump).
dumps: []
# Files copied to the host as they are, each { src: local path, dest, mode }; owned by root.
files: []
# Snapshot the newest k3s etcd snapshot, staged in /var/backups/etcd.
etcd_snapshot: false
# Explicit UTC: the hosts run in different timezones.
+9
View File
@@ -73,6 +73,15 @@
when: kopia_backup_status.rc != 0
no_log: true
- name: Install the files of the host
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
owner: root
group: root
loop: "{{ kopia_backup.files }}"
- name: Install the backup script
ansible.builtin.template:
src: kopia-backup.j2