2018-08-25 06:47:57 +00:00
|
|
|
---
|
2018-11-10 15:24:18 +00:00
|
|
|
- name: Mount backup disk
|
2018-11-10 15:25:09 +00:00
|
|
|
mount:
|
2018-11-10 15:25:45 +00:00
|
|
|
path: "{{ backup_mount_point }}"
|
2018-11-10 15:24:18 +00:00
|
|
|
src: "UUID={{ backup_disk_uuid }}"
|
|
|
|
fstype: ext4
|
|
|
|
opts: default
|
|
|
|
state: present
|
|
|
|
|
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:13:48 +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
|