|
|
|
@ -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 }}
|
|
|
|
|