summaryrefslogtreecommitdiff
path: root/run-ickweb.yml
diff options
context:
space:
mode:
Diffstat (limited to 'run-ickweb.yml')
-rwxr-xr-xrun-ickweb.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/run-ickweb.yml b/run-ickweb.yml
new file mode 100755
index 0000000..82fdace
--- /dev/null
+++ b/run-ickweb.yml
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -eu
+
+
+getaddr()
+{
+ awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" |
+ sed 's/ansible_ssh_host=//'
+}
+
+
+mkhosts()
+{
+ cat <<EOF
+demo ansible_ssh_host=$(getaddr demo)
+
+[ickwebhost]
+demo
+EOF
+}
+
+
+hosts_in="$1"
+shift 1
+mkhosts > hosts.tmp
+ansible-playbook \
+ ickweb.yml \
+ -i hosts.tmp \
+ -e ickweb_domain_name="$(getaddr demo)" \
+ "$@"