summaryrefslogtreecommitdiffstats
path: root/ansible_helpers/wait-for-ssh
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-03 13:53:22 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-03 14:24:26 +0200
commitdd52a3df190ad677e23654dbba8bf553565a159b (patch)
tree50dc25d35110c45c05bbab6ec319dd4a92836a33 /ansible_helpers/wait-for-ssh
parent37c8dc6c89714e553bb5ce32a83910a1407d7067 (diff)
downloadpostgresql-setup-tests-dd52a3df190ad677e23654dbba8bf553565a159b.tar.gz
postgresql-setup-tests-dd52a3df190ad677e23654dbba8bf553565a159b.tar.xz
postgresql-setup-tests-dd52a3df190ad677e23654dbba8bf553565a159b.zip
ansible: incorporate os1 triggers
* ansible/dummy-wrapper.yml: Helper playbook to directly invoke "included" playbooks. * ansible/fedora.yml: The "main" playbook (new file). * ansible/include/beakerlib.yml: New file, install beakerlib remotely. * ansible/include/prepare-testenv.yml: Install the test dependencies remotely. * ansible/run_include: Helper script to run included playbooks. * dist: Do not distribute ansible playbooks in tarball. * get_machine: Helper script to obtain openstack machine, not used currently. * lib_pgsql.sh: Assert for PG_VERSION, not for datadir (as it by default exists after postgresql-server installation. * run_remote: Helper script invoking the main ansible playbook. * ansible_helpers/wait-for-ssh: Helper script as 'wait_for' is broken? * README: Document. * .gitignore: Ignore private files.
Diffstat (limited to 'ansible_helpers/wait-for-ssh')
-rwxr-xr-xansible_helpers/wait-for-ssh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ansible_helpers/wait-for-ssh b/ansible_helpers/wait-for-ssh
new file mode 100755
index 0000000..eb3880a
--- /dev/null
+++ b/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