Add regex check for ssh connection

This patch adds a check for the appropriate OpenSSH Daemon
reponse when waiting for the container to restart. This is
an optimisation over simply waiting for the TCP port.

Change-Id: Ie25af4f57bb98fb1d846d579b58b4d479b476675
Closes-Bug: #1476885
This commit is contained in:
Stanley Karunditu 2015-07-31 10:23:26 +01:00 committed by Jesse Pretorius
parent 0923c17da8
commit 9e08d31fe2
7 changed files with 16 additions and 0 deletions

View File

@ -87,6 +87,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -27,6 +27,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -77,6 +77,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -38,6 +38,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -40,6 +40,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -38,6 +38,7 @@
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:

View File

@ -42,6 +42,16 @@
delegate_to: "{{ physical_host }}"
tags:
- flush-net-cache
- name: Wait for container ssh
wait_for:
port: "22"
delay: 5
search_regex: "OpenSSH"
host: "{{ ansible_ssh_host }}"
delegate_to: "{{ physical_host }}"
tags:
- rsyslog-ssh-wait
roles:
- { role: "rsyslog_server", tags: [ "rsyslog-server" ] }
- role: "system_crontab_coordination"