From 4c3147c1b2363150ab6fc74ac48d9aae3902d71e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 25 Jul 2021 10:48:25 +0200 Subject: [PATCH] Add script to configure k8s vms --- k8s/configure-k8s-vms.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 k8s/configure-k8s-vms.sh diff --git a/k8s/configure-k8s-vms.sh b/k8s/configure-k8s-vms.sh new file mode 100755 index 0000000..e83c513 --- /dev/null +++ b/k8s/configure-k8s-vms.sh @@ -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}