scripts: support top-level autoinstall in validator

This commit is contained in:
Chris Peterson 2024-03-25 21:30:54 -07:00
parent ba3dbb52ef
commit ecfc3a4df0
1 changed files with 7 additions and 1 deletions

View File

@ -60,7 +60,13 @@ def main() -> None:
assert user_data.readline() == "#cloud-config\n"
def get_autoinstall_data(data): return data["autoinstall"]
else:
def get_autoinstall_data(data): return data
def get_autoinstall_data(data):
try:
cfg = data["autoinstall"]
except KeyError:
cfg = data
return cfg
# Verify autoinstall doc link is in the file