- name: Install Borg
apt:
pkg:
- borgbackup
- borgmatic
- name: Install apprise
pip:
name: apprise
- name: Copy Borgmatic script
template:
src: "{{ role_path }}/templates/backup.yml.j2"
dest: /root/backup.yml
- name: Copy start_vms.sh
copy:
src: "{{ role_path }}/files/start_vms.sh"
dest: /root/start_vms.sh
mode: preserve
- name: Copy stop_vms.sh
src: "{{ role_path }}/files/stop_vms.sh"
dest: /root/stop_vms.sh
- name: Copy systemd backup unit
src: "{{ role_path }}/files/backup.service"
dest: /etc/systemd/system/backup.service
notify: systemd daemon reload
- name: Copy systemd backup timer
src: "{{ role_path }}/files/backup.timer"
dest: /etc/systemd/system/backup.timer
- name: Enable backup timer
systemd:
name: backup.timer
enabled: true
state: started