Implement retries for SSH check

Most of often when Ansible can't connect to the container, it has
started up and appears to still be in the process of completing
the startup.

This implements retries for the SSH connection to increase the
chance of success.

Change-Id: I55f95628905180add79e2548e0553ca15dd19e2b
This commit is contained in:
Jesse Pretorius 2016-08-03 09:30:03 +01:00
parent 019f156ab3
commit 4d154ae1ad

View File

@ -252,6 +252,9 @@
host: "{{ ansible_ssh_host | default(inventory_hostname) }}" host: "{{ ansible_ssh_host | default(inventory_hostname) }}"
search_regex: OpenSSH search_regex: OpenSSH
delay: "{{ lxc_container_ssh_delay }}" delay: "{{ lxc_container_ssh_delay }}"
register: ssh_wait_check
until: ssh_wait_check | success
retries: 3
tags: tags:
- lxc-container-networks - lxc-container-networks