From 0ea276592c5df21bf86ac4d59417ba5426ac3aca Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 5 Jun 2023 10:00:15 +0200 Subject: [PATCH] Bugfix get_hosts when running more than 1 host --- .gitignore | 1 + kubeconfig | 19 ------------------- scripts/.common | 4 +++- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100755 kubeconfig diff --git a/.gitignore b/.gitignore index 92a31c2..52dd726 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ cache data dist kubeconfig +secrets config.yaml .dls_adm_token diff --git a/kubeconfig b/kubeconfig deleted file mode 100755 index 60c0d80..0000000 --- a/kubeconfig +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -clusters: -- cluster: - server: https://172.17.1.100:6443 - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNNakNDQVpPZ0F3SUJBZ0lVZFM5bU5PenhscGJBdXVWcWYyQjIydy96MzdVd0NnWUlLb1pJemowRUF3UXcKTXpFUk1BOEdBMVVFQ2hNSWJtOTJhWFF1YVc4eEhqQWNCZ05WQkFNVEZVUnBjbVZyZEdsc0lFeHZZMkZzSUZObApjblpsY2pBZUZ3MHlNekExTVRneE1UQXpNREJhRncweU9EQTFNVFl4TVRBek1EQmFNRE14RVRBUEJnTlZCQW9UCkNHNXZkbWwwTG1sdk1SNHdIQVlEVlFRREV4VkVhWEpsYTNScGJDQk1iMk5oYkNCVFpYSjJaWEl3Z1pzd0VBWUgKS29aSXpqMENBUVlGSzRFRUFDTURnWVlBQkFBOXdac3h0U2l2RUhUQW50aUx4WFFkUmdxR05sempRMGYwelowQwpyc3hmSGF1K0xrQ1JZNDFoN29ZY21XdVArK09FUlNOL3BGUjhNL3lCZ1dRR0JBbDd2Z0JhZEtpZ01xcHMyalhXCmxUTmt1dnJJbzZhMitESWpjTWNITUhyUUpNUFpzSm8vWGRwOWIyaW5yM2U4dnBiUjFEeEwwRDJMcy9WaWFZL2EKWEE1akR0ZHp2YU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0VHTUE4R0ExVWRFd0VCL3dRRk1BTUJBZjh3SFFZRApWUjBPQkJZRUZIdUpKVjVwN0EzdEhWWDkrb2dkQ1IxZkVFbFBNQW9HQ0NxR1NNNDlCQU1FQTRHTUFEQ0JpQUpDCkFQZHZlOU9nRjFmTjE5T2VjTXc0WEhSVFBGcmMvVHp6SFA0WmlRQVRKdUlLMS9hVEozK1k4QUd5b3ByNElXbmsKUWZZeWtVVmpFREJIVTFLN1JWU1h3YjdJQWtJQnd5K2FORVd6N0hxZE5QQTRKZXV2M3ZKUGFXdU9vRElERWxoMwora3o0ZjFpUkR5QVFKbXZta2dxRzA1M214RmRZU2VIU0NpQ2hhN242RG5kUTgveDYwODA9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K - name: localconfig -contexts: -- context: - cluster: localconfig - namespace: kube-system - user: admin - name: localconfig -current-context: localconfig -kind: Config -preferences: {} -users: -- name: admin - user: - token: DU3ITMWLQN2TVGVDTWIURJ42S4 diff --git a/scripts/.common b/scripts/.common index a750c32..7016ee2 100644 --- a/scripts/.common +++ b/scripts/.common @@ -80,11 +80,13 @@ unlock_store() { get_hosts() { - hosts_files=$(basename $ctxdir/hosts/*.yaml|sed 's/.yaml//') + cd $ctxdir/hosts + hosts_files=$(ls *.yaml|sed 's/.yaml//') for h in ${hosts_files}; do ip=$(grep ip: $ctxdir/hosts/${h}.yaml|awk '{print $2}') hosts[$h]="$ip" done + cd - } get_parts() {