summaryrefslogtreecommitdiff
path: root/run-host-playbook.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-12-09 01:53:23 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-12-09 01:53:23 +0100
commit755a54f2233e2aa9a27d3ab018879f7efbe8c501 (patch)
tree5d61aaafac00352b99a52dc20e13ba3fd7a35f34 /run-host-playbook.sh
parentfixed acmetool self-signed cert handling (diff)
parentvm installation works now again (diff)
Merge branch 'new-repo-structure'
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"