Improve lxc config

This commit is contained in:
Daniel A. Maierhofer
2018-03-16 17:53:25 +01:00
parent 23894561fd
commit 013e945d2d
11 changed files with 41 additions and 82 deletions

View File

@@ -1,24 +0,0 @@
# {{ ansible_managed }}
lxc.network.type = veth
lxc.network.link = br0
lxc.network.flags = up
lxc.network.hwaddr = 2e:6d:b6:07:14:01
lxc.aa_profile = unconfined
lxc.rootfs = /var/lib/lxc/lxc-{{ lxc_host }}-01/rootfs
lxc.rootfs.backend = dir
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.utsname = lxc-betam-01
lxc.arch = amd64
lxc.cgroup.devices.allow = c 188:0 rwm
lxc_host: betam
lxc_rev: 01
lxc_hwaddr: 2e:6d:b6:07:14:01
lxc_extra: lxc.cgroup.devices.allow = c 188:0 rwm

View File

@@ -3,15 +3,17 @@
lxc.network.type = veth
lxc.network.link = br0
lxc.network.flags = up
lxc.network.hwaddr = {{ lxc_hwaddr }}
lxc.network.hwaddr = {{ item.hwaddr }}
lxc.aa_profile = unconfined
lxc.rootfs = /var/lib/lxc/lxc-{{ lxc_host }}-{{ lxc_rev }}/rootfs
lxc.rootfs = /var/lib/lxc/lxc-{{ item.name }}-{{ item.revision }}/rootfs
lxc.rootfs.backend = dir
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.include = /usr/share/lxc/config/{{ item.template }}.common.conf
lxc.utsname = lxc-{{ lxc_host }}-{{ lxc-rev }}
lxc.utsname = lxc-{{ item.name }}-{{ item.revision }}
lxc.arch = amd64
{% if item.extra is defined %}
{{ lxc_extra }}
{{ item.extra }}
{% endif %}