36 lines
695 B
YAML
36 lines
695 B
YAML
---
|
|
- name: Install borgbackup
|
|
pacman:
|
|
name: borg
|
|
state: present
|
|
|
|
- name: Create script directory
|
|
file:
|
|
path: "{{ borg_script_path }}"
|
|
state: directory
|
|
mode: 755
|
|
|
|
- name: Automate toward local RAID backup with systemd timer
|
|
template:
|
|
src: files/choux_borg.sh
|
|
dest: "{{ borg_script_path }}/backup.sh"
|
|
mode: 755
|
|
|
|
- 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
|
|
service:
|
|
name: choux_borg
|
|
state: started
|
|
enabled: yes
|