Add script to configure k8s vms
This commit is contained in:
parent
f73089acd5
commit
4c3147c1b2
1 changed files with 21 additions and 0 deletions
21
k8s/configure-k8s-vms.sh
Executable file
21
k8s/configure-k8s-vms.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
# Nico Schottelius
|
||||
# 2021-07-25
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "$0 cdist-workdir list-of-ipv6-addresses-of-vms"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
workdir=$1; shift
|
||||
|
||||
names=""
|
||||
|
||||
for vm in "$@"; do
|
||||
# get name and remove trailing dot
|
||||
name=$(dig +short -x $vm | sed 's/\.$//')
|
||||
names="$names $name"
|
||||
done
|
||||
|
||||
cd "${workdir}"
|
||||
cdist config -vv -j6 -p30 ${names}
|
Loading…
Reference in a new issue