ansible/roles/cryptoraid/tasks/alpine.yml

64 lines
1.1 KiB
YAML
Raw Normal View History

2022-09-27 10:27:00 +02:00
---
- name: install packages
apk:
name:
2022-10-03 18:30:24 +02:00
- btrfs-progs
- cryptsetup
- gnupg
2022-09-27 10:27:00 +02:00
- 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
2022-10-03 18:30:24 +02:00
- name: create script directories
file:
path: "/usr/local/{{ item }}"
state: directory
mode: '0755'
loop:
- bin
- etc
- share
- name: copy unlock scripts
copy:
src: "bin/{{ item }}"
dest: "/usr/local/bin/{{ item }}"
mode: '0755'
loop:
- remote-unlock.sh
- unlock-luks.sh
- name: copy helper unlock files
copy:
src: share/unlock-luks-helpers.sh
dest: /usr/local/share/unlock-luks-helpers.sh
mode: '0644'
- name: copy unlock config files
template:
src: unlock-luks.conf.j2
dest: /usr/local/etc/unlock-luks.conf
mode: '0644'
- name: create root's ssh directory
file:
path: "/root/.ssh"
state: directory
mode: '0755'
- name: copy authorized_keys
copy:
src: authorized_keys
dest: /root/.ssh/authorized_keys