21 lines
353 B
Bash
Executable file
21 lines
353 B
Bash
Executable file
#!/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}
|