diff --git a/hetzner/autoinstall/handlers/main.yml b/hetzner/autoinstall/handlers/main.yml index c131b9b..daea996 100644 --- a/hetzner/autoinstall/handlers/main.yml +++ b/hetzner/autoinstall/handlers/main.yml @@ -1,11 +1,2 @@ - name: unlock_disk - block: - - name: send unlock command - raw: "printf '{{ autoinstall_disk_encryption_secret }}' | cryptroot-unlock" - - name: wait for boot - wait_for: - delay: 5 - port: '{{ ansible_ssh_port|default(22) }}' - host: '{{ ansible_ssh_host }}' - search_regex: OpenSSH|dropbear - timeout: 300 + include_tasks: tasks/unlock.yml diff --git a/hetzner/autoinstall/tasks/unlock.yml b/hetzner/autoinstall/tasks/unlock.yml new file mode 100644 index 0000000..c73a332 --- /dev/null +++ b/hetzner/autoinstall/tasks/unlock.yml @@ -0,0 +1,9 @@ +- name: send unlock command + raw: "printf '{{ autoinstall_disk_encryption_secret }}' | cryptroot-unlock" +- name: wait for boot + wait_for: + delay: 5 + port: '{{ ansible_ssh_port|default(22) }}' + host: '{{ ansible_ssh_host }}' + search_regex: OpenSSH|dropbear + timeout: 300