change backup location

This commit is contained in:
Pim Kunis 2023-05-15 22:19:34 +02:00
parent 914a192f79
commit ed2ce14258
4 changed files with 18 additions and 10 deletions

View file

@ -1,5 +1,5 @@
[defaults]
roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
roles_path=~/.ansible/roles:roles:/usr/share/ansible/roles:/etc/ansible/roles
inventory=inventory
vault_password_file=util/secret-service-client.sh
interpreter_python=/usr/bin/python3

View file

@ -1,5 +1,5 @@
kingston1tb_mount_point: "/mnt/kingston1TB"
kingston1tb_uuid: "622a8d81-aa2f-460b-a563-c3cdb6285609"
backup_mount_point: "/mnt/backups"
backup_uuid: "622a8d81-aa2f-460b-a563-c3cdb6285609"
admin_public_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
@ -20,3 +20,5 @@ deploy_ssh_certificates:
key_type: ed25519
signing_key: hyp_host
host: lewis.hyp
docker_repository: ubuntu

View file

@ -26,24 +26,24 @@
- name: Ensure backup directory exists
file:
path: "{{ kingston1tb_mount_point }}/hosts"
path: "{{ backup_mount_point }}/hosts"
state: directory
- name: Create backup respositories
command:
cmd: "borg init -e none {{ kingston1tb_mount_point }}/hosts/{{ item }}"
creates: "{{ kingston1tb_mount_point }}/hosts/{{ item }}"
cmd: "borg init -e none {{ backup_mount_point }}/hosts/{{ item }}"
creates: "{{ backup_mount_point }}/hosts/{{ item }}"
with_items: "{{ backup_hosts }}"
- name: Create extra disk moint point
file:
path: "{{ kingston1tb_mount_point }}"
path: "{{ backup_mount_point }}"
state: directory
- name: Mount extra disk
ansible.posix.mount:
path: "{{ kingston1tb_mount_point }}"
src: "UUID={{ kingston1tb_uuid }}"
mount:
path: "{{ backup_mount_point }}"
src: "UUID={{ backup_uuid }}"
fstype: ext4
passno: 1
state: present
@ -51,3 +51,6 @@
roles:
- {role: apt, tags: apt}
- {role: deploy_ssh_certificates, tags: deploy_ssh_certificates}
# - {role: docker, tags: docker}
# - {role: uptime_kuma, tags: uptime_kuma}
# - {role: alerts, tags: alerts}

View file

@ -4,3 +4,6 @@
- name: deploy_ssh_certificates
src: https://git.pim.kunis.nl/home/ansible-role-deploy-ssh-certificates
scm: git
- name: docker
src: https://git.pim.kunis.nl/pim/ansible-role-docker
scm: git