diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 21489c5..80201a8 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -1,6 +1,7 @@ borg_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIBTag7YToG5W+H2kEUz40kOH+7cs0Lp3owFFKkmHBiWM" dataserver_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIJsLVptkoOwmxs6DnenN8u7Q1Tm/Psh0QdI6vjrTgb6D" -backup_location: "/root/homeserver_backup" +kingston1tb_mount_point: "/mnt/kingston1TB" +backup_location: "{{ kingston1tb_mount_point }}/homeserver_backup" admin_public_keys: - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop" diff --git a/inventory/group_vars/dataserver.yml b/inventory/group_vars/dataserver.yml new file mode 100644 index 0000000..bef25b6 --- /dev/null +++ b/inventory/group_vars/dataserver.yml @@ -0,0 +1 @@ +kingston1tb_uuid: "622a8d81-aa2f-460b-a563-c3cdb6285609" \ No newline at end of file diff --git a/roles/dataserver/tasks/main.yml b/roles/dataserver/tasks/main.yml index cfbfb5c..b2d0ea0 100644 --- a/roles/dataserver/tasks/main.yml +++ b/roles/dataserver/tasks/main.yml @@ -20,6 +20,16 @@ state: latest update_cache: yes cache_valid_time: 86400 # One day +- 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: "{{ kingston1tb_uuid }}" + fstype: ext4 + state: present - name: Install borg apt: name: borgbackup