{% if unprivileged %}# Distribution configuration (unprivileged)lxc.include = /usr/share/lxc/config/common.conflxc.include = /usr/share/lxc/config/userns.conflxc.arch = linux64 {% if distro == 'debian' %}lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none bind,optional 0 0lxc.mount.entry = /sys/kernel/security sys/kernel/security none bind,optional 0 0lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0{% endif %} lxc.apparmor.profile = generated # Container specific configurationlxc.idmap = u 0 {{ subuidmap }}lxc.idmap = g 0 {{ subgidmap }} {% else %}# Distribution configuration (privileged)lxc.include = /usr/share/lxc/config/debian.common.conf lxc.apparmor.profile = generatedlxc.apparmor.allow_nesting = 1 lxc.tty.max = 4lxc.arch = amd64lxc.pty.max = 1024 # Container specific configuration{% endif %}lxc.uts.name = {{ vm_name }}lxc.rootfs.path = lvm:/dev/{{ vg_name }}/vm_{{ vm_name }} # Network configurationlxc.net.0.type = vethlxc.net.0.flags = uplxc.net.0.link = br0lxc.net.0.name = eth0lxc.net.0.ipv4.address = {{ hostvars | ip_from_inventory(vm_name) }}/24lxc.net.0.ipv4.gateway = {{ hostvars | ip_from_inventory('vm_gateway') }}lxc.start.auto = {% if auto_start %}1{% else %}0{% endif %}