added backup role

This commit is contained in:
opalvaults
2022-07-18 16:51:37 -07:00
parent 2ce7ddde38
commit cb4e14bc35
7 changed files with 55 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
---
- name: Pull Backup Repository
git:
repo: "{{ backup_repo }}"
dest: "{{ backup_repo_dir }}"
update: no
- name: Ensure correct file/dir ownership
file:
path: "{{ backup_repo_dir }}"
recurse: True
owner: opal
group: opal
- name: Copy Borgmatic Cronjob
copy:
src: borgmatic-cron
dest: /etc/cron.d/borgmatic
mode: u+x
owner: root
group: root

View File

@@ -0,0 +1,4 @@
---
backup_repo: git@codeberg.org:opalvaults/backup.git
backup_repo_dir: /home/opal/projects/backup-config