summaryrefslogtreecommitdiff
path: root/run-host-playbook.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-12-09 01:50:05 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-12-09 01:50:05 +0100
commitd131f5240dd124c2ea747ec7665e28e2daafb012 (patch)
tree5d61aaafac00352b99a52dc20e13ba3fd7a35f34 /run-host-playbook.sh
parentgot rid playbooks and host_playbooks folder (diff)
vm installation works now again
Diffstat (limited to 'run-host-playbook.sh')
-rwxr-xr-xrun-host-playbook.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/run-host-playbook.sh b/run-host-playbook.sh
new file mode 100755
index 00000000..e3b54f22
--- /dev/null
+++ b/run-host-playbook.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+ echo "$0 <host>"
+ exit 1
+fi
+host="$1"
+shift
+
+cd "${BASH_SOURCE%/*}"
+source common/utils.sh
+ansible_variable__get env_group "$host" || exit 1
+vault_environment__set "$env_group" || exit 1
+
+echo "######## running host playbook for host '$host' in environment '$env_group' ########"
+exec ansible-playbook $@ "$env_group/$host.yml"