krebs-hosts-*: don't add lines without alias

This commit is contained in:
tv 2019-02-02 09:22:06 +01:00 committed by lassulus
parent 659cbed237
commit cdb548ac30

View File

@ -42,7 +42,7 @@ in {
# hostNetAliases : host -> { ${netname} : [addrAliases] }
hostNetAliases = host:
mapAttrs (_: net: filter (x: x.name != null) [
mapAttrs (_: net: filter (x: x.name != null && x.value != []) [
{ name = net.ip4.addr or null; value = net.aliases; }
{ name = net.ip6.addr or null; value = net.aliases; }
]) host.nets;