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

View File

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

View File

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