From 31984db41cd5cfddcc94bad96810368823d687bc Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Thu, 24 Nov 2022 15:53:46 +0100 Subject: [PATCH] handler with include --- hetzner/autoinstall/handlers/main.yml | 11 +---------- hetzner/autoinstall/tasks/unlock.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 hetzner/autoinstall/tasks/unlock.yml 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