This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/roles/dataserver/tasks/main.yml
2023-01-11 20:04:31 +01:00

18 lines
No EOL
434 B
YAML

- 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 }}"