From 2422a081a5be0d5ac5afb122361bc283da67341f Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 22 Oct 2014 08:54:05 +0200 Subject: big reorg: prepare for generalization Try to split into three separate components -> controller, tester, and 'tasks' (postgresql-tasks in our case). The controller component is the main part which is able to run the task remotely. Tester is more-like library for 'tasks' component (should be reusable on the raw git level). * controller: Almost separated component. * postgresql-tasks: Likewise. * tester: Likewise. --- controller/ansible_helpers/wait-for-ssh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 controller/ansible_helpers/wait-for-ssh (limited to 'controller/ansible_helpers') diff --git a/controller/ansible_helpers/wait-for-ssh b/controller/ansible_helpers/wait-for-ssh new file mode 100755 index 0000000..eb3880a --- /dev/null +++ b/controller/ansible_helpers/wait-for-ssh @@ -0,0 +1,11 @@ +#!/bin/bash -x + +where="$1" + +test -z "$where" && echo >&2 "no host specified" && exit 1 + +while [ 1 ]; do + ssh -o StrictHostKeyChecking=no -q $where exit &>/dev/null && exit 0 +done + +exit 1 -- cgit