gui: make update machine work

Also fix error when age plugins not defined
This commit is contained in:
DavHau
2025-04-30 15:19:43 +07:00
parent e6ad61c266
commit 02ca5bd870
3 changed files with 10 additions and 32 deletions

View File

@@ -108,13 +108,9 @@ def update_machines(base_path: str, machines: list[InventoryMachine]) -> None:
name,
flake=flake,
)
if not machine.get("deploy", {}).get("targetHost"):
msg = f"'TargetHost' is not set for machine '{name}'"
raise ClanError(msg)
# Copy targetHost to machine
m.override_target_host = machine.get("deploy", {}).get("targetHost")
# Would be nice to have?
# m.override_build_host = machine.deploy.buildHost
# prefer target host set via inventory, but fallback to the one set in the machine
if target_host := machine.get("deploy", {}).get("targetHost"):
m.override_target_host = target_host
group_machines.append(m)
deploy_machines(group_machines)