name 'lxc'
description 'LXC role.'

run_list(
  'recipe[lxcs::lxc]',
)

#env_run_lists()

#default_attributes()

override_attributes(
  'lxcs' => {
    'lxc' => {
      'extra-default.conf' => {
        'default-br0.conf' => [
          'lxc.network.type = veth',
          'lxc.network.link = br0',
          'lxc.network.flags = up',
          'lxc.network.hwaddr = 00:16:3e:xx:xx:xx',
        ],
        'default-br0-unpriv.conf' => [
          'lxc.network.type = veth',
          'lxc.network.link = br0',
          'lxc.network.flags = up',
          'lxc.network.hwaddr = 00:16:3e:xx:xx:xx',
          'lxc.id_map = u 0 100000 65536',
          'lxc.id_map = g 0 100000 65536',
        ],
      },
      'lxc-usernet' => [
        #'alice veth lxcbr0 10',
      ],
      'unprivileged_container' => {
        'enabled' => true,
        'users_allow' => [
          'root',
          #'alice',
        ],
      },
    },
  },
)
