2018-08-25 06:47:57 +00:00
|
|
|
---
|
|
|
|
- name: Install borgbackup
|
|
|
|
pacman:
|
|
|
|
name: borg
|
|
|
|
state: present
|
|
|
|
|
2018-11-10 15:10:37 +00:00
|
|
|
- name: Create script directory
|
|
|
|
file:
|
|
|
|
path: "{{ borg_script_path }}"
|
|
|
|
state: directory
|
|
|
|
mode: 755
|
|
|
|
|
2018-10-08 08:28:02 +00:00
|
|
|
- name: Automate toward local RAID backup with systemd timer
|
2018-08-25 06:47:57 +00:00
|
|
|
template:
|
2018-10-08 08:28:02 +00:00
|
|
|
src: files/choux_borg.sh
|
2018-11-10 15:10:37 +00:00
|
|
|
dest: "{{ borg_script_path }}"/backup.sh
|
2018-08-25 06:47:57 +00:00
|
|
|
mode: 755
|
|
|
|
|
2018-10-08 08:28:02 +00:00
|
|
|
- name: Backup systemd timer
|
|
|
|
template:
|
|
|
|
src: files/choux_borg.timer
|
|
|
|
dest: /etc/systemd/system/
|
|
|
|
mode: 755
|
|
|
|
|
|
|
|
- name: Backup systemd service
|
|
|
|
template:
|
|
|
|
src: files/choux_borg.service
|
|
|
|
dest: /etc/systemd/system/
|
|
|
|
mode: 755
|
|
|
|
|
|
|
|
- name: Enable systemd borg script
|
2018-08-26 10:20:05 +00:00
|
|
|
service:
|
2018-10-08 08:28:02 +00:00
|
|
|
name: choux_borg
|
2018-08-26 10:20:05 +00:00
|
|
|
state: started
|
|
|
|
enabled: yes
|