From 9cb202f8e1da0b2b52a61205bf78a52d6d03b737 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Sun, 17 Dec 2023 22:42:43 +0100 Subject: [PATCH] parse clusterName from config --- talos-bootsrtap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/talos-bootsrtap b/talos-bootsrtap index c1c2c2b..0d6174a 100755 --- a/talos-bootsrtap +++ b/talos-bootsrtap @@ -16,6 +16,8 @@ if [ ! -f controlplane.yaml ]; then default_cluster_name=talos fi cluster_name=$(dialog --keep-tite --title talos-bootstrap --inputbox "Enter cluster name:" 8 40 "$default_cluster_name" 3>&1 1>&2 2>&3) || exit 0 +else + cluster_name=$(awk '/cluster:$/ {while(getline) {if ($1 == "clusterName:") {print $2; exit}}}' controlplane.yaml) fi # Screen: Enter networks to scan