diff --git a/salt/lxc-containers-1/config b/salt/lxc-containers-1/config index c68123a..8547ec7 100644 --- a/salt/lxc-containers-1/config +++ b/salt/lxc-containers-1/config @@ -7,10 +7,10 @@ lxc.rootfs.backend = dir lxc.autodev = 1 lxc.kmsg = 0 -{%- for net, type in container.interfaces.items() %} -lxc.network.type={{ type }} +{%- for net, conf in container['interfaces'].items() %} +lxc.network.type={{ conf['type'] }} lxc.network.flags=up -{% if type == 'veth' %} +{% if conf['type'] == 'veth' %} lxc.network.veth.pair={{ id }}-{{ net }} {%- endif %} {%- set inet_addr = pillar['hosts-inet'][net].get(id) %} @@ -18,7 +18,7 @@ lxc.network.veth.pair={{ id }}-{{ net }} {%- set prefix_len = pillar['subnets-inet'][net].split('/')[1] %} lxc.network.ipv4={{ inet_addr }}/{{ prefix_len }} {%- endif %} -{%- if type == 'veth' %} +{%- if conf['type'] == 'veth' %} lxc.network.link=br-{{ net }} {%- endif %} lxc.network.name={{ net }} diff --git a/salt/lxc-containers-1/containers.yaml b/salt/lxc-containers-1/containers.yaml index 4d1fae0..5d5c84c 100644 --- a/salt/lxc-containers-1/containers.yaml +++ b/salt/lxc-containers-1/containers.yaml @@ -26,6 +26,6 @@ upstream1: type: veth anon1: - interface: + interfaces: core: type: veth