Skip to content

Commit

Permalink
core: 云镜像 yaml 删除空 dns 节点,避免 cloud-init 报错
Browse files Browse the repository at this point in the history
  • Loading branch information
bin456789 committed Nov 16, 2023
1 parent f045ca3 commit e5a6877
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,9 @@ create_cloud_init_network_config() {
yq -i ".network.config[1].address += [\"$cur\"]" $ci_file
done
fi

# 如果 network.config[1] 没有 address,则删除,避免低版本 cloud-init 报错
yq -i 'del(.network.config[1] | select(has("address") | not))' $ci_file
}

truncate_machine_id() {
Expand Down

0 comments on commit e5a6877

Please sign in to comment.