forked from DGNum/infrastructure
fix(meta): Only define targetHost when the network config is defined
This commit is contained in:
parent
e1586b4873
commit
c3f4e7ade6
1 changed files with 3 additions and 2 deletions
|
@ -205,11 +205,12 @@ in
|
|||
config = {
|
||||
deployment = {
|
||||
tags = [ "infra-${config.site}" ];
|
||||
targetHost =
|
||||
targetHost = mkIf (builtins.hasAttr name args.config.network) (
|
||||
let
|
||||
ip = with args.config.network.${name}.addresses; ipv4 ++ ipv6;
|
||||
in
|
||||
mkIf (ip != [ ]) (mkDefault (builtins.head ip));
|
||||
mkIf (ip != [ ]) (mkDefault (builtins.head ip))
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue