diff options
Diffstat (limited to 'run-single.sh')
-rwxr-xr-x | run-single.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/run-single.sh b/run-single.sh new file mode 100755 index 0000000..b36258d --- /dev/null +++ b/run-single.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -eu + + +hosts_in="$1" +shift 1 + + +getip() +{ + awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" +} + + +mkhosts() +{ + cat <<EOF +[ick] +qvisqve hostname=qvisqve ansible_ssh_host=$(getip qvisqve) +ick2 hostname=ick ansible_ssh_host=$(getip ick2) +EOF +} + +mkhosts > hosts.tmp +ansible-playbook -i hosts.tmp ick2.yml \ + -e "qvisqve_domain=$(getip qvisqve)" \ + -e "controller_domain=$(getip ick2)" \ + -e "artifact_store_domain=$(getip ick2)" \ + -e "apt_domain=$(getip ick2)" \ + "$@" |