move from homeservers repo

This commit is contained in:
Pim Kunis 2023-02-25 15:35:35 +01:00
commit e7492b10e3
10 changed files with 110 additions and 0 deletions

22
roles/borg/tasks/main.yml Normal file
View file

@ -0,0 +1,22 @@
- name: Create extra disk moint point
file:
path: "{{ kingston1tb_mount_point }}"
state: directory
- name: Mount extra disk
ansible.posix.mount:
path: "{{kingston1tb_mount_point }}"
src: "UUID={{ kingston1tb_uuid }}"
fstype: ext4
passno: 1
state: present
- name: Install borg
apt:
name: borgbackup
- name: Add Borg public key
authorized_key:
key: "ssh-ed25519 {{ borg_public_key }} root@max"
user: "{{ ansible_user_id }}"
- name: Create Borg repository
command:
cmd: "borg init -e none {{ backup_location }}"
creates: "{{ backup_location }}"