You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB
YAML

- name: Installing LXC and dependensies
pacman: name={{ item }} state=present
with_items:
- lxc
- python
- dnsmasq
- name: Create LXC config and autostart files
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: 0644
with_items:
- { src: '../files/50-lxc.conf', dest: '/etc/sysctl.d/50-lxc.conf' }
- { src: '../files/lxc-auto-delayed.service', dest: '/etc/systemd/system/lxc-auto-delayed.service' }
- name: Setup LXC-Network
- name: Activate autostart for LXC-Container
systemd:
name: "{{ item }}"
enable: yes
deamon_reload: yes
with_items:
- lxc-auto.service
- lxc-auto-delayed.service
- name: Installing python-lxc for Ansible lxc support
pip:
name: lxc-python2
- name: Create some Bashscripts for simpliefy lxc usage
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: 0644
with_items:
- { src: '../files/lxc-create.sh', dest: '/root/lxc-create.sh' }
- { src: '../files/lxcbtrfsconverter.sh', dest: '/root/lxc-btrfsconverter.sh' }