blob: b36258d0026090323fc4ff07fb5d96df9f67c6d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)" \
"$@"
|