Compare commits
3 commits
914cf2a687
...
217b44c3fa
Author | SHA1 | Date | |
---|---|---|---|
217b44c3fa |
|||
ed8670f7da |
|||
987327863a |
16 changed files with 169 additions and 0 deletions
1
inventories/chaosknoten/host_vars/router.yaml
Normal file
1
inventories/chaosknoten/host_vars/router.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
systemd_networkd__config_dir: 'resources/chaosknoten/router/systemd_networkd/'
|
|
@ -55,6 +55,9 @@ all:
|
|||
public-reverse-proxy:
|
||||
ansible_host: public-reverse-proxy.hamburg.ccc.de
|
||||
ansible_user: chaos
|
||||
router:
|
||||
ansible_host: router.hamburg.ccc.de
|
||||
ansible_user: chaos
|
||||
wiki:
|
||||
ansible_host: wiki-intern.hamburg.ccc.de
|
||||
ansible_user: chaos
|
||||
|
@ -81,9 +84,13 @@ base_config_hosts:
|
|||
pad:
|
||||
pretalx:
|
||||
public-reverse-proxy:
|
||||
router:
|
||||
tickets:
|
||||
wiki:
|
||||
zammad:
|
||||
systemd_networkd_hosts:
|
||||
hosts:
|
||||
router:
|
||||
docker_compose_hosts:
|
||||
hosts:
|
||||
ccchoir:
|
||||
|
@ -161,6 +168,7 @@ infrastructure_authorized_keys_hosts:
|
|||
pad:
|
||||
pretalx:
|
||||
public-reverse-proxy:
|
||||
router:
|
||||
wiki:
|
||||
zammad:
|
||||
wiki_hosts:
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
roles:
|
||||
- base_config
|
||||
|
||||
- name: Ensure systemd-networkd config deployment on systemd_networkd_hosts
|
||||
hosts: systemd_networkd_hosts
|
||||
roles:
|
||||
- systemd_networkd
|
||||
|
||||
- name: Ensure deployment of infrastructure authorized keys
|
||||
hosts: infrastructure_authorized_keys_hosts
|
||||
roles:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[Match]
|
||||
MACAddress=BC:24:11:54:11:15
|
||||
Type=ether
|
||||
|
||||
[Link]
|
||||
Name=net0
|
|
@ -0,0 +1,6 @@
|
|||
[Match]
|
||||
MACAddress=BC:24:11:9A:FB:34
|
||||
Type=ether
|
||||
|
||||
[Link]
|
||||
Name=net1
|
|
@ -0,0 +1,6 @@
|
|||
[Match]
|
||||
MACAddress=BC:24:11:AE:C7:04
|
||||
Type=ether
|
||||
|
||||
[Link]
|
||||
Name=net2
|
|
@ -0,0 +1,7 @@
|
|||
[NetDev]
|
||||
Name=net0.2
|
||||
Kind=vlan
|
||||
|
||||
[VLAN]
|
||||
Id=2
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[NetDev]
|
||||
Name=net0.3
|
||||
Kind=vlan
|
||||
|
||||
[VLAN]
|
||||
Id=3
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[Match]
|
||||
Name=net0
|
||||
|
||||
[Link]
|
||||
RequiredForOnline=no
|
||||
|
||||
[Network]
|
||||
VLAN=net0.2
|
||||
VLAN=net0.3
|
||||
|
||||
LinkLocalAddressing=no
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[Match]
|
||||
Name=net1
|
||||
|
||||
[Network]
|
||||
DNS=212.12.50.158
|
||||
IPForward=ipv4
|
||||
IPv6AcceptRA=no
|
||||
|
||||
[Address]
|
||||
Address=212.12.48.123/24
|
||||
|
||||
[Route]
|
||||
Gateway=212.12.48.55
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[Match]
|
||||
Name=net2
|
||||
|
||||
[Network]
|
||||
#DNS=212.12.50.158
|
||||
IPForward=ipv6
|
||||
IPv6AcceptRA=no
|
||||
|
||||
[Address]
|
||||
Address=2a00:14b0:4200:3500::130:2/112
|
||||
|
||||
[Route]
|
||||
Gateway=2a00:14b0:4200:3500::130:1
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Match]
|
||||
Name=net0.2
|
||||
Type=vlan
|
||||
|
||||
[Link]
|
||||
RequiredForOnline=no
|
||||
|
||||
[Network]
|
||||
Description=v4-NAT
|
||||
|
||||
IPMasquerade=ipv4
|
||||
IPv6SendRA=yes
|
||||
|
||||
[Address]
|
||||
Address=10.32.2.1/24
|
||||
|
||||
[IPv6SendRA]
|
||||
UplinkInterface=net2
|
||||
|
||||
[IPv6Prefix]
|
||||
Prefix=2a00:14b0:42:102::/64
|
||||
Assign=true
|
||||
Token=static:::1
|
|
@ -0,0 +1,29 @@
|
|||
[Match]
|
||||
Name=net0.3
|
||||
Type=vlan
|
||||
|
||||
[Link]
|
||||
RequiredForOnline=no
|
||||
|
||||
[Network]
|
||||
Description=ci-runners
|
||||
|
||||
IPMasquerade=ipv4
|
||||
IPv6SendRA=yes
|
||||
|
||||
DHCPServer=true
|
||||
|
||||
[DHCPServer]
|
||||
PoolOffset=100
|
||||
PoolSize=150
|
||||
|
||||
[Address]
|
||||
Address=10.32.3.1/24
|
||||
|
||||
[IPv6SendRA]
|
||||
UplinkInterface=net2
|
||||
|
||||
[IPv6Prefix]
|
||||
Prefix=2a00:14b0:42:103::/64
|
||||
Assign=true
|
||||
Token=static:::1
|
11
roles/systemd_networkd/README.md
Normal file
11
roles/systemd_networkd/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Role `systemd_networkd`
|
||||
|
||||
Deploys the given systemd-networkd configuration files.
|
||||
|
||||
## Support Distributions
|
||||
|
||||
Should work on Debian-based distributions.
|
||||
|
||||
## Required Arguments
|
||||
|
||||
- `systemd_networkd__config_dir`: Directory with systemd-networkd configs to deploy.
|
6
roles/systemd_networkd/meta/argument_specs.yaml
Normal file
6
roles/systemd_networkd/meta/argument_specs.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
argument_specs:
|
||||
main:
|
||||
options:
|
||||
systemd_networkd__config_dir:
|
||||
type: path
|
||||
required: true
|
14
roles/systemd_networkd/tasks/main.yaml
Normal file
14
roles/systemd_networkd/tasks/main.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: ensure rsync is installed
|
||||
ansible.builtin.apt:
|
||||
name: rsync
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: synchronize systemd-networkd configs
|
||||
ansible.posix.synchronize:
|
||||
src: "{{ systemd_networkd__config_dir }}"
|
||||
dest: "/etc/systemd/network"
|
||||
archive: false
|
||||
recursive: true
|
||||
delete: true
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue