diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-07 18:47:37 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-07 18:47:37 +0300 |
commit | 61c12b7938bd8fd8c17155b646b08fd1caf3cd6c (patch) | |
tree | c233df31c843f2e178fbd8114d6e1af434d6ba76 /run-ickweb.yml | |
parent | c0f9a32ae8f092b7ba552798ea1ae2f2fdd9666a (diff) | |
download | ick2-ansible-61c12b7938bd8fd8c17155b646b08fd1caf3cd6c.tar.gz |
Change: use haproxy role from debian-ansible, add ickweb, etc
Diffstat (limited to 'run-ickweb.yml')
-rwxr-xr-x | run-ickweb.yml | 31 |
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)" \ + "$@" |