Compare commits

...

2 Commits

Author SHA1 Message Date
Dmitry Belyaev 8f0fa185f6 run config/update_files.sh 2023-05-17 09:15:31 +03:00
Dmitry Belyaev 3c56f77c2b add remove_trailing_whitespace() 2023-05-17 09:14:40 +03:00
2 changed files with 10 additions and 3 deletions

View File

@ -159,7 +159,7 @@ autoinstall:
export LANG=ru_RU.UTF-8
# --- force set timezone ---
- timedatectl set-timezone Europe/Moscow
# --- force apt update ---
# --- force apt update ---
- |
set -x
apt-get update

View File

@ -9,14 +9,21 @@ gen_files() {
}
update_files_from() {
SRC=$1 yq -i '.autoinstall.user-data.write_files |= load(strenv(SRC)).write_files' nocloud/user-data
SRC="$2" yq -i '.autoinstall.user-data.write_files |= load(strenv(SRC)).write_files' "$1"
}
remove_trailing_whitespace() {
sed -i 's/[ \t]*$//' "$1"
}
pushd config >/dev/null 2>&1
TARGET_YML="nocloud/user-data"
TMP_YML=$(temp_yml)
gen_files "$TMP_YML"
update_files_from "$TMP_YML"
remove_trailing_whitespace "$TARGET_YML"
update_files_from "$TARGET_YML" "$TMP_YML"
rm -f "$TMP_YML"
popd >/dev/null 2>&1