From 130beda5a317a614374890117f9e262c89430332 Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Thu, 25 May 2023 08:49:36 +0400 Subject: [PATCH] add wait for ssh --- molecule_qemu/playbooks/create.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/molecule_qemu/playbooks/create.yml b/molecule_qemu/playbooks/create.yml index 11aefbe..c56413f 100644 --- a/molecule_qemu/playbooks/create.yml +++ b/molecule_qemu/playbooks/create.yml @@ -115,6 +115,17 @@ loop_control: label: "{{ item.name }}" + - name: Wait for SSH to be ready + ansible.builtin.wait_for: + host: "{{ item.vm_ssh_host }}" + port: "{{ item.vm_ssh_port }}" + delay: 5 + timeout: 180 + search_regex: "OpenSSH" + loop: "{{ molecule_instances }}" + loop_control: + label: "{{ item.name }}" + - name: Prepare VMs config dict ansible.builtin.set_fact: instance_conf_dict: {