Bugfix get_hosts when running more than 1 host

This commit is contained in:
Guillaume
2023-06-05 10:00:15 +02:00
parent 35be88ec61
commit 0ea276592c
3 changed files with 4 additions and 20 deletions

View File

@ -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() {