44 lines
969 B
YAML
44 lines
969 B
YAML
---
|
|
|
|
- name: install busybox, cryptsetup and dropbear
|
|
apt:
|
|
name:
|
|
- busybox
|
|
- dropbear
|
|
- dropbear-initramfs
|
|
- cryptsetup
|
|
- cryptsetup-initramfs
|
|
state: present
|
|
update_cache: true
|
|
tags:
|
|
- packages
|
|
notify: update initramfs
|
|
|
|
- name: enable busybox in initramfs
|
|
replace:
|
|
path: /etc/initramfs-tools/initramfs.conf
|
|
regexp: '^#?BUSYBOX=.*$'
|
|
replace: "BUSYBOX=y"
|
|
notify: update initramfs
|
|
|
|
- name: set NO_START because we want to use openssh
|
|
replace:
|
|
path: /etc/default/dropbear
|
|
regexp: "^NO_START=.*$"
|
|
replace: "NO_START=1"
|
|
notify: update initramfs
|
|
|
|
- name: disable dropbear because we use openssh after boot
|
|
service:
|
|
name: dropbear
|
|
state: stopped
|
|
enabled: false
|
|
|
|
- name: authorized_keys for dropbear
|
|
template:
|
|
src: "private/sshkeys/{{ myusername }}.authorized_keys"
|
|
dest: /etc/dropbear/initramfs/authorized_keys
|
|
mode: 0700
|
|
force: true
|
|
notify: update initramfs
|