lib/get_host: improve abstraction, turn missconfiguration into a warning
Motivation: A warning should encourage consistent usage of inventory.machines setting targetHost inside the machine should be considered a custom override Changing the warning strings to avoid the term 'nix'/'json' both inventory and nixos machines are nix features
This commit is contained in:
@@ -188,7 +188,7 @@ def get_host(
|
||||
|
||||
if host_str is None:
|
||||
machine.warn(
|
||||
f"'{field}' is not set in `inventory.machines.${name}.deploy.targetHost` - falling back to _slower_ nixos option: `clan.core.networking.targetHost`"
|
||||
f"'{field}' is not set in `inventory.machines.${name}.deploy.targetHost` - falling back to _slower_ nixos option: `clan.core.networking.{field}`"
|
||||
)
|
||||
host_str = machine.select(f'config.clan.core.networking."{field}"')
|
||||
source = "machine"
|
||||
|
||||
Reference in New Issue
Block a user