machine/host: degrade into info and add docs

This commit is contained in:
Johannes Kirschbauer
2025-07-07 11:52:46 +02:00
parent a269124840
commit eaae9b0025
3 changed files with 86 additions and 2 deletions

View File

@@ -189,9 +189,10 @@ def get_host(
host_str = inv_machine.get("deploy", {}).get(field)
if host_str is None:
machine.warn(
f"'{field}' is not set in `inventory.machines.${machine.name}.deploy.{field}` - falling back to _slower_ nixos option: `clan.core.networking.{field}`"
machine.info(
f"`inventory.machines.{machine.name}.deploy.{field}` is not set — falling back to `clan.core.networking.{field}`. See: https://docs.clan.lol/guides/target-host"
)
host_str = machine.select(f'config.clan.core.networking."{field}"')
source = "machine"