skip machines without target_host when running clan machines update

This commit is contained in:
Jörg Thalheim
2024-02-06 14:45:21 +01:00
parent b9ee5d7c0c
commit 8db4d31a52
2 changed files with 17 additions and 4 deletions

View File

@@ -49,9 +49,8 @@ class Machine:
@property
def target_host(self) -> str:
# deploymentAddress is deprecated.
val = (
self.deployment_info.get("targetHost")
or self.deployment_info["deploymentAddress"]
val = self.deployment_info.get("targetHost") or self.deployment_info.get(
"deploymentAddress"
)
if val is None:
msg = f"the 'clan.networking.targetHost' nixos option is not set for machine '{self.name}'"