summaryrefslogtreecommitdiff
path: root/run-single.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-06-13 15:01:18 +0300
committerLars Wirzenius <liw@liw.fi>2018-06-13 15:01:18 +0300
commit83b3574f3abf2c367a7a687867273e6259975ce6 (patch)
treebf963ee59b71a10d0a187b8e1ff8e36ecb1acbe1 /run-single.sh
parent363fbccdbe5e9e6774f9a949cc1d8670d6287c48 (diff)
downloadick2-ansible-83b3574f3abf2c367a7a687867273e6259975ce6.tar.gz
Change: update stuff for deploying working ick instances
Diffstat (limited to 'run-single.sh')
-rwxr-xr-xrun-single.sh31
1 files changed, 20 insertions, 11 deletions
diff --git a/run-single.sh b/run-single.sh
index 4033b22..4b9ad06 100755
--- a/run-single.sh
+++ b/run-single.sh
@@ -3,7 +3,7 @@
set -eu
-getip()
+getaddr()
{
awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" |
sed 's/ansible_ssh_host=//'
@@ -13,16 +13,25 @@ getip()
mkhosts()
{
cat <<EOF
-single ansible_ssh_host=$(getip single)
+ick ansible_ssh_host=$(getaddr ick)
-[qvisqve]
-single
+[ickhost]
+ick
[controller]
-single
+ick
+
+[qvisqve]
+ick
+
+[apt]
+ick
+
+[notify]
+ick
[workers]
-single
+ick
EOF
}
@@ -33,9 +42,9 @@ mkhosts > hosts.tmp
ansible-playbook \
-i hosts.tmp \
ick2.yml \
- -e qvisqve_domain="$(getip single)" \
- -e controller_domain="$(getip single)" \
- -e artifact_store_domain="$(getip single)" \
- -e apt_domain="$(getip single)" \
- -e notify_domain="$(getip single)" \
+ -e qvisqve_domain="$(getaddr ick)" \
+ -e controller_domain="$(getaddr ick)" \
+ -e artifact_store_domain="$(getaddr ick)" \
+ -e apt_domain="$(getaddr ick)" \
+ -e notify_domain="$(getaddr ick)" \
"$@"