unlock as handler

master
Michael Wilson 3 years ago
parent 63311f5585
commit 794cd5c773
  1. 2
      hetzner/autoinstall/handlers/main.yml
  2. 4
      hetzner/autoinstall/tasks/main.yml

@ -0,0 +1,2 @@
- name: unlock_disk
raw: "printf '{{ autoinstall_disk_encryption secret }}' | cryptroot-unlock"

@ -1,5 +1,6 @@
- name: bootstrap fully encrypted linux image
when: hetzner_autoinstall|default(false)
notify: unlock_disk
block:
- name: copy setup.conf template
template:
@ -24,6 +25,3 @@
- name: reboot
reboot:
- name: unlock disk
raw: "printf '{{ autoinstall_disk_encryption secret }}' | cryptroot-unlock"
when: hetzner_autoinstall|default(false) or disk_unlock|default(false)

Loading…
Cancel
Save