Add lxc void template and xbps

This commit is contained in:
Daniel A. Maierhofer
2018-04-22 01:48:30 +02:00
parent ee32d88b20
commit 14160c29ad
6 changed files with 277 additions and 7 deletions

View File

@@ -21,13 +21,7 @@
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
copy: dest=/etc/lxc/default.conf src=lxc_default.conf owner=root group=root mode=0644 backup=yes
- name: lxc - create container
lxc_container:

View File

@@ -0,0 +1,28 @@
---
- name: lxc - install xbps build depencies
package: name="{{ item }}"
with_items:
- zlib1g-dev
- pkg-config
- libarchive-dev
- libssl1.0-dev
- name: lxc - xbps git
git:
repo: https://github.com/voidlinux/xbps.git
dest: /opt/xbps
force: yes
register: git_clone
- name: lxc - xbps build and install
shell: cd /opt/xbps && /opt/xbps/configure --enable-debug && make && make install clean && ldconfig
when: git_clone.changed
- name: lxc - /usr/share/lxc/templates/lxc-voidlinux
copy: dest=/usr/share/lxc/templates/lxc-voidlinux src=lxc-voidlinux owner=root group=root mode=0755 backup=yes
- name: lxc - /usr/share/lxc/config/voidlinux.common.conf
copy: dest=/usr/share/lxc/config/voidlinux.common.conf src=voidlinux.common.conf owner=root group=root mode=0644 backup=yes
- name: lxc - /usr/share/lxc/config/voidlinux.userns.conf
copy: dest=/usr/share/lxc/config/voidlinux.userns.conf src=voidlinux.userns.conf owner=root group=root mode=0644 backup=yes

View File

@@ -23,6 +23,10 @@
when: ariane_lxc
tags: ['ariane_lxc', 'lxc']
- include_tasks: lxc_void.yml
when: ariane_lxc_void
tags: ['ariane_lxc_void', 'lxc', 'lxc_void']
- include_tasks: snapper.yml
when: ariane_snapper
tags: ['ariane_snapper', 'snapper']