]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: add a helper script to generate vagrant ssh configs
authorAlfredo Deza <adeza@redhat.com>
Fri, 4 Nov 2016 17:58:07 +0000 (13:58 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 4 Nov 2016 18:13:30 +0000 (14:13 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
Resolves: pytest#harness

tests/scripts/generate_ssh_config.sh [new file with mode: 0644]

diff --git a/tests/scripts/generate_ssh_config.sh b/tests/scripts/generate_ssh_config.sh
new file mode 100644 (file)
index 0000000..43e64a6
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Generate a custom ssh config from Vagrant so that it can then be used by
+# ansible.cfg 
+
+path=$1
+
+if [ $# -eq 0 ]
+  then
+    echo "A path to the scenario is required as an argument and it wasn't provided"
+    exit 1
+fi
+
+cd "$path"
+vagrant ssh-config > vagrant_ssh_config