31 lines
792 B
Plaintext
31 lines
792 B
Plaintext
lxc.utsname = {{ id }}
|
|
# Handled by lxc@.service
|
|
lxc.start.auto = 0
|
|
lxc.rootfs = /var/lib/lxc/{{ id }}/rootfs
|
|
lxc.rootfs.backend = dir
|
|
|
|
lxc.autodev = 1
|
|
lxc.kmsg = 0
|
|
|
|
{%- for net, conf in container['interfaces'].items() %}
|
|
lxc.network.type={{ conf['type'] }}
|
|
lxc.network.flags=up
|
|
{% if conf['type'] == 'veth' %}
|
|
lxc.network.veth.pair={{ id }}-{{ net }}
|
|
{%- endif %}
|
|
{%- set inet_addr = pillar['hosts-inet'][net].get(id) %}
|
|
{%- if inet_addr %}
|
|
{%- set prefix_len = pillar['subnets-inet'][net].split('/')[1] %}
|
|
lxc.network.ipv4={{ inet_addr }}/{{ prefix_len }}
|
|
{%- endif %}
|
|
{%- if conf['type'] == 'veth' %}
|
|
lxc.network.link=br-{{ net }}
|
|
{%- endif %}
|
|
lxc.network.name={{ net }}
|
|
#lxc.network.ipv4.gateway=
|
|
#lxc.network.ipv6=
|
|
#lxc.network.ipv6.gateway=fe80::1
|
|
{%- endfor %}
|
|
|
|
## TODO: limits + caps
|