summaryrefslogtreecommitdiff
path: root/vm-install.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-11-21 22:28:39 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-11-21 22:28:39 +0100
commit91cd5480b5a1ca1103d5e239af3d331477c41c2c (patch)
treeb495bf31e2d5da50b045838a1e8d0455db09ee65 /vm-install.sh
initial commit as copy from helsinki ansible repo
Diffstat (limited to 'vm-install.sh')
-rwxr-xr-xvm-install.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/vm-install.sh b/vm-install.sh
new file mode 100755
index 00000000..9f0f52a5
--- /dev/null
+++ b/vm-install.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+if [ -z "$1" ] || [ -z "$2" ]; then
+ echo "$0 <vm> <distro>"
+ exit 1
+fi
+
+echo "installing vm: $1 with distro $2"
+echo ""
+
+echo "########## clearing old ssh host keys #########"
+./remove-known-host.sh "$1"
+echo ""
+
+echo "######## running the install playbook ########"
+exec ansible-playbook -e "vmname=$1" -e "vmdistro=$2" vminstall.yaml