legacy: add forceVeth hack for unrelated problem

This commit is contained in:
Astro 2021-03-27 01:32:51 +01:00
parent 3d2cfa4e8a
commit 454566755b
1 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,12 @@ let
then result // { "${to}" = attrset.${name}; }
else result // { "${name}" = attrset.${name}; }
) {} (builtins.attrNames attrset);
# HACK: `type = "phys"` works but once an LXC container is stopped
# the VLAN interface is not moved back.
forceVeth = interface: interface // {
type = "veth";
};
in
{
options.salt-pillar = lib.mkOption {};
@ -50,8 +56,9 @@ in
role = "container";
location = mainServer;
interfaces =
builtins.mapAttrs (_:
builtins.mapAttrs (_: interface:
renameAttr "gw" "gw4"
(forceVeth interface)
) container.interfaces;
ospf =
let