arch_backup major fixes

1. Don't automount disks (dconf changes) this breaks backups
2. Rewrite the entire backup script to handle mounting, decrypting,
   many use cases, etc
3. Update main.yaml to not create mount location for backup drive,
   script will handle it
This commit is contained in:
ducoterra
2022-02-03 12:34:54 -05:00
parent f1bbf399bc
commit f3ce93554d
4 changed files with 232 additions and 94 deletions

View File

@@ -5,28 +5,6 @@
state: directory
path: "{{ snapshots.path }}"
become: yes
- name: Ensure backup mount directory
file:
state: directory
path: "{{ mount.path }}"
become: yes
- name: Ensure {{ mount.path }} device exists in crypttab
community.general.crypttab:
name: "{{ disk.name }}"
backing_device: "UUID={{ disk.uuid }}"
password: "{{ disk.password }}"
opts: luks
state: present
become: yes
no_log: true
- name: Ensure {{ disk.name }} mount exists in fstab
ansible.posix.mount:
path: "{{ mount.path }}"
src: /dev/mapper/{{ disk.name }}
fstype: btrfs
opts: nofail,x-systemd.device-timeout=1,noatime,compress=zstd
state: present
become: yes
- name: Ensure /usr/local/scripts exists
file:
state: directory