Add script to configure k8s vms

This commit is contained in:
Nico Schottelius 2021-07-25 10:48:25 +02:00
parent f73089acd5
commit 4c3147c1b2

21
k8s/configure-k8s-vms.sh Executable file
View 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}