ansible-playbooks/roles/system/external_backup/tasks/main.yml
Gabriel Arazas 38ba766e2c Initialize backup setup with a role
Based from my NixOS module for the borg backups. Apparently, borgmatic
can run all configured setups from certain locations with one command.
It should be easy to add the remaining backups too.

Now, encrypting the sensitive configurations is another problem (or I
just don't include them in the Git worktree).
2022-03-19 12:33:09 +08:00

15 lines
432 B
YAML

---
- name: Configure external storage device
ansible.posix.mount:
state: mounted
path: /mnt/external-storage
src: UUID=665A391C5A38EB07
fstype: ntfs
opts: nofail,noauto,user,x-systemd.automount,x-systemd.device-timeout=2,x-systemd.idle-timeout=2
- name: Add the borgmatic configuration
copy:
src: "{{ role_path }}/files/borgmatic.yml"
dest: /etc/borgmatic.d/external-storage.yaml
setype: etc_t