Copy per-host files of kopia_backup from a files list, empty by default
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user