47 lines
960 B
YAML
47 lines
960 B
YAML
---
|
|
- name: lxc - install lxc
|
|
apt: name=lxc
|
|
|
|
- name: lxc - install libpam-cgfs
|
|
apt: name=libpam-cgfs
|
|
|
|
- name: lxc - install bridge-utils
|
|
apt: name=bridge-utils
|
|
|
|
- name: lxc - install python-lxc
|
|
apt: name=python-lxc
|
|
|
|
- name: lxc - /etc/default/lxc-net
|
|
copy:
|
|
dest: /etc/default/lxc-net
|
|
content: 'USE_LXC_BRIDGE="true"'
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
backup: yes
|
|
|
|
- name: lxc - /etc/lxc/default.conf
|
|
copy:
|
|
dest: /etc/lxc/default.conf
|
|
src: lxc_default.conf
|
|
owner: root
|
|
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 }}"
|