system/ansible/deployment_poc/tasks/wait.yml
Georg Pfuetzenreuter 7e55910b27
Deployment PoC - Add pexpect supervision
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
2022-02-14 00:32:26 +01:00

43 lines
890 B
YAML

---
- name: Sit patiently
block:
- name: Wait for guest to become alive
wait_for:
delay: 240
connect_timeout: 3
sleep: 15
port: 22
host: '{{ ip_address }}'
search_regex: OpenSSH
timeout: 600
# rescue:
# - name: Destroy
# community.libvirt.virt:
# uri: "{{ libvirt_url }}"
# command: destroy
# name: "{{ vm_name }}"
# state: destroyed
#
# - name: Start
# community.libvirt.virt:
# uri: "{{ libvirt_url }}"
# command: start
# name: "{{ vm_name }}"
# state: running
#
# - name: Wait for guest to become alive
# wait_for:
# delay: 120
# connect_timeout: 3
# sleep: 15
# port: 22
# host: '{{ ip_address }}'
# search_regex: OpenSSH
# timeout: 600
delegate_to: localhost
tags:
- init_ssh