infra-ansible/wait_for_servers.yml
Ricardo Carrillo Cruz 929490ff8c Wait for server to be ssh reachable before bootstrap/configuration
Change-Id: Id229a8de97f08ebca3aff04aa612cd922a73e9a6
2016-06-08 14:54:16 +00:00

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'] }}"