From 0e98ec0861cb1964abce6ecbd296e91af864918d Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 1 Jan 2019 22:52:49 +0000 Subject: [PATCH] wait for ssh port --- tasks/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 533dc75..0eb9816 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,15 +13,14 @@ pause: seconds: "{{ reboot_pause_seconds }}" -- name: wait for ssh - local_action: wait_for - args: - host: "{{ ansible_host | default(inventory_hostname) }}" +- name: wait for ssh port + wait_for: + host: "{{ ansible_host | default(inventory_hostname) }}" port: 22 search_regex: OpenSSH - delay: 0 timeout: "{{ reboot_wait_timeout_seconds }}" - state: started + vars: + ansible_connection: local - include_role: name: ssh_host_key