Add vm zyklon

This commit is contained in:
Daniel A. Maierhofer
2018-03-15 00:23:38 +01:00
parent fe190983df
commit 7e9ad5b771
5 changed files with 47 additions and 7 deletions

View File

@@ -0,0 +1,15 @@
# {{ ansible_managed }}
lxc.network.type = veth
lxc.network.link = br0
lxc.network.flags = up
lxc.network.hwaddr = 2e:6d:b6:07:15:01
lxc.aa_profile = unconfined
lxc.rootfs = /var/lib/lxc/lxc-zyklon-01/rootfs
lxc.rootfs.backend = dir
lxc.include = /usr/share/lxc/config/voidlinux.common.conf
lxc.utsname = lxc-zyklon-01
lxc.arch = amd64

View File

@@ -1,13 +1,13 @@
--- ---
#- name: lxc - betam container - name: lxc - betam container
# lxc_container: lxc_container:
# name: betam name: lxc-betam-01
# template: debian template: debian
- name: lxc - betam config - name: lxc - betam config
copy: template:
dest: /var/lib/lxc/lxc-betam-01/config dest: /var/lib/lxc/lxc-betam-01/config
src: lxc-betam.conf src: lxc-betam.conf.j2
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644

View File

@@ -0,0 +1,14 @@
---
- name: lxc - zyklon container
lxc_container:
name: lxc-zyklon-01
template: voidlinux
- name: lxc - zyklon config
copy:
dest: /var/lib/lxc/lxc-zyklon-01/config
src: lxc-zyklon.conf
owner: root
group: root
mode: 0644
backup: yes

View File

@@ -27,6 +27,10 @@
when: ariane_lxc when: ariane_lxc
tags: ['ariane_lxc', 'lxc'] tags: ['ariane_lxc', 'lxc']
- include_tasks: lxc-zyklon.yml
when: ariane_lxc
tags: ['ariane_lxc', 'lxc']
- include_tasks: snapper.yml - include_tasks: snapper.yml
when: ariane_snapper when: ariane_snapper
tags: ['ariane_snapper', 'snapper'] tags: ['ariane_snapper', 'snapper']

View File

@@ -6,7 +6,7 @@ lxc.network.flags = up
lxc.network.hwaddr = 2e:6d:b6:07:14:01 lxc.network.hwaddr = 2e:6d:b6:07:14:01
lxc.aa_profile = unconfined lxc.aa_profile = unconfined
lxc.rootfs = /var/lib/lxc/lxc-betam-01/rootfs lxc.rootfs = /var/lib/lxc/lxc-{{ lxc_host }}-01/rootfs
lxc.rootfs.backend = dir lxc.rootfs.backend = dir
lxc.include = /usr/share/lxc/config/debian.common.conf lxc.include = /usr/share/lxc/config/debian.common.conf
@@ -15,3 +15,10 @@ lxc.utsname = lxc-betam-01
lxc.arch = amd64 lxc.arch = amd64
lxc.cgroup.devices.allow = c 188:0 rwm 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