mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-09 20:38:32 +01:00
feat: backup+mail
This commit is contained in:
19
roles/backup-vm/files/vsyncdir.conf
Normal file
19
roles/backup-vm/files/vsyncdir.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
[general]
|
||||
status_path = "~/.vdirsyncer/status/"
|
||||
|
||||
[pair ths_caldav]
|
||||
a = "ths_remote_caldav"
|
||||
b = "ths_local_caldav"
|
||||
collections = ["from a"]
|
||||
|
||||
[storage ths_remote_caldav]
|
||||
type = "caldav"
|
||||
read_only = true
|
||||
url = "https://ths.atlantishq.de/remote.php/dav/calendars/backup/ths_shared_by_ths/"
|
||||
username = "backup"
|
||||
password = "HISTORY_PURGED_SECRET"
|
||||
|
||||
[storage ths_local_caldav]
|
||||
type = "filesystem"
|
||||
path = "~/ths-caldav/"
|
||||
fileext = ".ics"
|
||||
32
roles/backup-vm/tasks/main.yaml
Normal file
32
roles/backup-vm/tasks/main.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
- name: Install tools
|
||||
apt:
|
||||
pkg:
|
||||
- zip
|
||||
- vdirsyncer
|
||||
|
||||
- name: Copy Backup caldav script
|
||||
copy:
|
||||
src: ths_cal_backup.sh
|
||||
dest: /home/sheppy/ths_cal_backup.sh
|
||||
owner: sheppy
|
||||
group: sheppy
|
||||
|
||||
- name: Copy vdirsync config
|
||||
copy:
|
||||
src: vsyncdir.conf
|
||||
dest: /home/sheppy/vsyncdir.conf
|
||||
owner: sheppy
|
||||
group: sheppy
|
||||
|
||||
- name: Create backups dir
|
||||
file:
|
||||
path: /home/sheppy/backups/
|
||||
state: directory
|
||||
owner: sheppy
|
||||
group: sheppy
|
||||
|
||||
- name: Clone backup tools
|
||||
git:
|
||||
repo: https://github.com/FAUSheppy/backup-tools
|
||||
dest: /home/sheppy/backups/backup-tools/
|
||||
version: master
|
||||
Reference in New Issue
Block a user