infra-ansible/wait_for_servers.yml

11 lines
274 B
YAML

---
# file: wait_for_servers.yml
- hosts: localhost
connection: local
gather_facts: no
user: ubuntu
become: true
tasks:
- wait_for: port=22 host="{{ hostvars[item]['ansible_ssh_host'] }}" search_regex=OpenSSH delay=10
with_items: "{{ groups['infra'] }}"