diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-06-02 18:20:02 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-06-02 18:20:02 +0300 |
commit | 471e77d02f2aad857800832989ac07127b9f004e (patch) | |
tree | 41fe1f039c74e73354cd402f069cbd03a554215f /run-single.sh | |
parent | 50fd7c57e6ad50c3354c3f3802f7da3b84c928c8 (diff) | |
download | ick2-ansible-471e77d02f2aad857800832989ac07127b9f004e.tar.gz |
Add: run-single.sh to install all of ick on one VM
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)" \ + "$@" |