mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 07:51:35 +01:00
77 lines
1.4 KiB
YAML
77 lines
1.4 KiB
YAML
- 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
|
|
template:
|
|
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
|
|
become: yes
|
|
become_user: sheppy
|
|
|
|
- name: Create SSH Dir
|
|
file:
|
|
path: /home/sheppy/.ssh/
|
|
state: directory
|
|
owner: sheppy
|
|
group: sheppy
|
|
|
|
- name: Copy SSH config and backup priv key
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "/home/sheppy/.ssh/{{ item }}"
|
|
owner: sheppy
|
|
group: sheppy
|
|
mode: 0600
|
|
with_items:
|
|
- backup_priv_key
|
|
- config
|
|
|
|
- name: template SLAPD backup script
|
|
template:
|
|
src: slapd_backup.sh
|
|
dest: /home/sheppy/
|
|
owner: sheppy
|
|
group: sheppy
|
|
mode: 0700
|
|
|
|
- name: Add slapd script to cron
|
|
cron:
|
|
minute: "10"
|
|
hour: "1"
|
|
name: SLAPD via rsync backup
|
|
job: /home/sheppy/slapd_backup.sh
|
|
user: sheppy
|
|
|
|
- name: Add ths nextcloud backup script to cron
|
|
cron:
|
|
minute: "0"
|
|
hour: "1"
|
|
name: THS Caldav Backup
|
|
job: /home/sheppy/ths_cal_backup.sh
|
|
user: sheppy
|