config: don't use location to select server for lxc containers
This commit is contained in:
parent
9255f76378
commit
cf3d9b4891
|
@ -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:
|
||||||
|
|
|
@ -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 != {};
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue