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,14 +0,0 @@
---
- name: lxc - betam container
lxc_container:
name: lxc-betam-01
template: debian
- name: lxc - betam config
template:
dest: /var/lib/lxc/lxc-betam-01/config
src: lxc-betam.conf.j2
owner: root
group: root
mode: 0644
backup: yes

View File

@@ -1,14 +0,0 @@
---
- 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

@@ -28,3 +28,19 @@
group: root
mode: 0644
backup: yes
- name: lxc - create container
lxc_container:
name: "lxc-{{ item.name }}-{{ item.revision }}"
template: "{{ item.template }}"
with_items: "{{ lxc.containers }}"
- name: lxc - config
template:
dest: "/var/lib/lxc/lxc-{{ item.name }}-{{ item.revision }}/config"
src: lxc.j2
owner: root
group: root
mode: 0644
backup: yes
with_items: "{{ lxc.containers }}"

View File

@@ -23,14 +23,6 @@
when: ariane_lxc
tags: ['ariane_lxc', 'lxc']
- include_tasks: lxc-betam.yml
when: ariane_lxc
tags: ['ariane_lxc', 'lxc']
- include_tasks: lxc-zyklon.yml
when: ariane_lxc
tags: ['ariane_lxc', 'lxc']
- include_tasks: snapper.yml
when: ariane_snapper
tags: ['ariane_snapper', 'snapper']