This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
homeserver-ansible/roles/filesystems/tasks/main.yml

27 lines
476 B
YAML

- name: Deploy keyfile
copy:
src: k5e.secret
dest: /k5e
mode: 0600
- name: Setup crypttab
community.general.crypttab:
backing_device: "{{ secondary_disk }}"
name: disk
state: present
password: /k5e
- name: Decrypt secondary disk
luks_device:
device: "{{ secondary_disk }}"
keyfile: /k5e
name: disk
state: opened
- name: Setup fstab
mount:
path: /mnt/disk
src: /dev/mapper/disk
state: mounted
fstype: ext4