ansible/roles/cryptoraid/tasks/alpine.yml

34 lines
611 B
YAML

---
- name: install packages
apk:
name:
- btrfs-progs
- cryptsetup
- gnupg
- gptfdisk
- sgdisk
- zstd
- name: load btrfs module
modprobe:
name: btrfs
state: present
- name: btrfs module on startup
lineinfile:
path: /etc/modules
line: btrfs
insertafter: EOF
- name: add drive block to dmcrypt config
blockinfile:
insertbefore: leave this comment last
path: /etc/conf.d/dmcrypt
block: "{{ lookup('template', 'dmcrypt_block.j2') }}"
- name: enable dmcrypt at boot
service:
name: dmcrypt
enabled: true
runlevel: boot