add data server

This commit is contained in:
pizzaniels 2023-01-11 20:04:31 +01:00
parent 2895d00e60
commit 812ba00884
20 changed files with 51 additions and 21 deletions

View file

@ -0,0 +1,18 @@
- name: APT upgrade
apt:
autoremove: true
upgrade: yes
state: latest
update_cache: yes
cache_valid_time: 86400 # One day
- name: Install borg
apt:
name: borgbackup
- name: Add Borg public key
authorized_key:
key: "{{ borg_public_key }}"
user: "{{ ansible_user_id }}"
- name: Create Borg repository
command:
cmd: "borg init -e none {{ backup_location }}"
creates: "{{ backup_location }}"