Skip to content
Snippets Groups Projects
Commit c392e997 authored by nimrod's avatar nimrod
Browse files

- NAT is still WIP (hanged on Debian bug).

- Updated TODO list.
parent b29d7ad3
No related branches found
No related tags found
No related merge requests found
......@@ -43,5 +43,7 @@ TODO
- If root mount is NOT btrfs, then create a sparse file, format with btrfs and
mount under /var/lib/machines.
- Disable the networking service, use systemd-networkd.
- Create a bridge with NAT using systemd-networkd, use dnsmasq for dns
resolving.
- Create a Debian Jessie base image to clone.
- Test mac-vlan on Vagrant.
[NetDev]
Name=nspawnbr0
Kind=bridge
[Match]
Name=nspawnbr0
[Network]
Address=192.168.123.1/24
DHCPServer=yes
IPMasquerade=yes
......@@ -10,7 +10,51 @@
with_items:
- systemd-sysv
- systemd-container
- libnss-myhostname
- libnss-mymachines
- libnss-resolve
- ufw
- btrfs-tools
- debootstrap
- yum
- dnsmasq
- name: Create npawn configuration directory
file:
path: /etc/systemd/nspawn
owner: root
group: root
mode: '0755'
state: directory
- name: Allow IP forwarding in UFW
ufw:
direction: routed
policy: allow
- name: Configure systemd-networkd
with_fileglob:
- '*.netdev'
- '*.network'
- '*.link'
copy:
src: '{{ item }}'
dest: '/etc/systemd/network/{{ item|basename }}'
owner: root
group: root
mode: '0644'
- name: Disable networking service, enable systemd-networkd
with_items:
- name: systemd-resolved
state: started
enabled: yes
- name: systemd-networkd
state: started
enabled: yes
- name: networking
enabled: no
service:
name: '{{ item.name }}'
state: '{{ item.state|default(omit) }}'
enabled: '{{ item.enabled }}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment