summaryrefslogtreecommitdiff
path: root/run-single.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run-single.sh')
-rwxr-xr-xrun-single.sh38
1 files changed, 24 insertions, 14 deletions
diff --git a/run-single.sh b/run-single.sh
index b36258d..4033b22 100755
--- a/run-single.sh
+++ b/run-single.sh
@@ -3,29 +3,39 @@
set -eu
-hosts_in="$1"
-shift 1
-
-
getip()
{
- awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in"
+ awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" |
+ sed 's/ansible_ssh_host=//'
}
mkhosts()
{
cat <<EOF
-[ick]
-qvisqve hostname=qvisqve ansible_ssh_host=$(getip qvisqve)
-ick2 hostname=ick ansible_ssh_host=$(getip ick2)
+single ansible_ssh_host=$(getip single)
+
+[qvisqve]
+single
+
+[controller]
+single
+
+[workers]
+single
EOF
}
+
+hosts_in="$1"
+shift 1
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)" \
- "$@"
+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)" \
+ "$@"