summaryrefslogtreecommitdiff
path: root/run-cluster.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-15 11:21:21 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-15 11:21:21 +0200
commit6d28f6080a23ede497a7957aa4e15553e5874a37 (patch)
tree8df1e76b874bfbc6be7c02de6f254476205ccbc6 /run-cluster.sh
parent9b9d4c2ead73275e02f0413978642db5ad5c6df6 (diff)
downloadick2-ansible-6d28f6080a23ede497a7957aa4e15553e5874a37.tar.gz
fix: make apt_repositroy work
Diffstat (limited to 'run-cluster.sh')
-rwxr-xr-xrun-cluster.sh50
1 files changed, 3 insertions, 47 deletions
diff --git a/run-cluster.sh b/run-cluster.sh
index 4c987ab..cb695ec 100755
--- a/run-cluster.sh
+++ b/run-cluster.sh
@@ -2,51 +2,7 @@
set -eu
-
-getaddr()
-{
- awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" |
- sed 's/ansible_ssh_host=//'
-}
-
-
-mkhosts()
-{
- cat <<EOF
-ick ansible_ssh_host=$(getaddr controller)
-worker1 hostname=worker1 ansible_ssh_host=$(getaddr worker1)
-worker2 hostname=worker2 ansible_ssh_host=$(getaddr worker2)
-
-[ickhost]
-ick
-worker1
-worker2
-
-[controller]
-ick
-
-[qvisqve]
-ick
-
-[apt]
-ick
-
-[notify]
-ick
-
-[workers]
-worker1
-worker2
-EOF
-}
-
-hosts_in="$1"
-shift 1
-mkhosts > hosts.tmp
-ansible-playbook -i hosts.tmp ick-cluster.yml \
- -e "qvisqve_domain=$(getaddr controller)" \
- -e "controller_domain=$(getaddr controller)" \
- -e "artifact_store_domain=$(getaddr controller)" \
- -e "apt_domain=$(getaddr controller)" \
- -e "notify_domain=$(getaddr controller)" \
+ansible-playbook -i hosts ick-cluster.yml \
+ -e controller_domain=controller \
+ -e @liw.yml \
"$@"