summaryrefslogtreecommitdiff
path: root/run-ickweb.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-07 18:47:37 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-07 18:47:37 +0300
commit61c12b7938bd8fd8c17155b646b08fd1caf3cd6c (patch)
treec233df31c843f2e178fbd8114d6e1af434d6ba76 /run-ickweb.yml
parentc0f9a32ae8f092b7ba552798ea1ae2f2fdd9666a (diff)
downloadick2-ansible-61c12b7938bd8fd8c17155b646b08fd1caf3cd6c.tar.gz
Change: use haproxy role from debian-ansible, add ickweb, etc
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)" \
+ "$@"