Bugfix get_hosts when running more than 1 host
This commit is contained in:
parent
35be88ec61
commit
0ea276592c
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,6 @@ cache
|
|||||||
data
|
data
|
||||||
dist
|
dist
|
||||||
kubeconfig
|
kubeconfig
|
||||||
|
secrets
|
||||||
config.yaml
|
config.yaml
|
||||||
.dls_adm_token
|
.dls_adm_token
|
||||||
|
19
kubeconfig
19
kubeconfig
@ -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
|
|
@ -80,11 +80,13 @@ unlock_store() {
|
|||||||
|
|
||||||
|
|
||||||
get_hosts() {
|
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
|
for h in ${hosts_files}; do
|
||||||
ip=$(grep ip: $ctxdir/hosts/${h}.yaml|awk '{print $2}')
|
ip=$(grep ip: $ctxdir/hosts/${h}.yaml|awk '{print $2}')
|
||||||
hosts[$h]="$ip"
|
hosts[$h]="$ip"
|
||||||
done
|
done
|
||||||
|
cd -
|
||||||
}
|
}
|
||||||
|
|
||||||
get_parts() {
|
get_parts() {
|
||||||
|
Loading…
Reference in New Issue
Block a user