config: don't use location to select server for lxc containers

This commit is contained in:
Astro 2021-08-20 21:37:43 +02:00
parent 9255f76378
commit cf3d9b4891
3 changed files with 4 additions and 8 deletions

View File

@ -137,7 +137,6 @@ in
dnscache = {
role = "container";
location = "server2";
interfaces.serv = {
gw4 = "serv-gw";
@ -310,7 +309,6 @@ in
ctPillar = self.lib.saltPillarFor name;
in {
role = "container";
location = "server2";
interfaces =
builtins.mapAttrs (net: interface:

View File

@ -13,10 +13,9 @@ let
# Containers that are run on this host
containers =
lib.filterAttrs (_: { role, model, location, ... }:
lib.filterAttrs (_: { role, model, ... }:
role == "container" &&
model == "lxc" &&
location == hostName
model == "lxc"
) config.site.hosts;
enabled = containers != {};

View File

@ -4,10 +4,9 @@
let
# LXC containers on this host
containers =
lib.filterAttrs (_: { role, model, location, ... }:
lib.filterAttrs (_: { role, model, ... }:
role == "container" &&
model == "lxc" &&
location == hostName
model == "lxc"
) config.site.hosts;
# Every bridged veth network required by all containers