Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
belzebub40k committed Feb 16, 2022
1 parent 75b1b16 commit c8f2a8d
Show file tree
Hide file tree
Showing 72 changed files with 940 additions and 812 deletions.
60 changes: 40 additions & 20 deletions inventory/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:ff::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -507,8 +509,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:1::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -544,8 +548,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:2::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -581,8 +587,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:3::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -618,8 +626,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:4::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -655,8 +665,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:5::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -692,8 +704,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:6::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -729,8 +743,10 @@ meshes:
ipv6_public:
- 2a03:2260:11a:7::/64
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -771,8 +787,10 @@ meshes:
- ffmz.org
- user.ffmz.org
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down Expand Up @@ -817,8 +835,10 @@ meshes:
- ffwi.org
- user.ffwi.org
batman:
it: 10000
gw: server 96mbit/96mbit
it: 10s
gw: server
up: 96M
down: 96M
mm: 0
dat: 1
hop_penalty: 60
Expand Down
1 change: 1 addition & 0 deletions inventory/group_vars/gateways
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
routing_tables:
icvpn: 23
mwu: 41
unreachable: 51
internet: 61

common_repos:
Expand Down
7 changes: 2 additions & 5 deletions playbooks/gateways.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
- service-ntpd
- kmod-batman
- wireguard
- network-routetables
- network-batman
- network-meshbridge
- network-fastd
- network-routing
- network-mesh
- network-ffrl
- network-iptables-gateway
- network-routing
- service-nginx
- service-nginx-firmware
- service-prometheus
Expand Down
5 changes: 1 addition & 4 deletions playbooks/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
- service-ntpd
- kmod-batman
- wireguard
- network-routetables
- network-batman
- network-meshbridge
- network-fastd
- network-routing
- network-mesh
- service-nginx
- service-nginx-openlayers
- service-cpthook
Expand Down
1 change: 0 additions & 1 deletion playbooks/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- service-haveged
- service-ntpd
- wireguard
- network-routetables
- network-routing
- service-bird
- service-nginx
Expand Down
6 changes: 3 additions & 3 deletions roles/network-anycast/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: reload network interfaces
- name: restart networkd
systemd:
name: networking
state: reloaded
name: systemd-networkd
state: restarted
14 changes: 10 additions & 4 deletions roles/network-anycast/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
- name: create anycast interface
- name: create anycast.netdev
template:
src: anycast.j2
dest: "/etc/network/interfaces.d/anycast"
notify: reload network interfaces
src: anycast.netdev.j2
dest: "/etc/systemd/network/anycast.netdev"
notify: restart networkd

- name: create anycast.network
template:
src: anycast.network.j2
dest: "/etc/systemd/network/anycast.netdev"
notify: restart networkd
8 changes: 0 additions & 8 deletions roles/network-anycast/templates/anycast.j2

This file was deleted.

6 changes: 6 additions & 0 deletions roles/network-anycast/templates/anycast.netdev.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# {{ ansible_managed }}
#
[NetDev]
Name=anycast
Kind=dummy
9 changes: 9 additions & 0 deletions roles/network-anycast/templates/anycast.network.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# {{ ansible_managed }}
#
[Match]
Name=anycast

[Network]
Address={{ anycast_ipv4 | ipaddr('network/prefix') }}
Address={{ anycast_ipv6 | ipaddr('network/prefix') }}
5 changes: 0 additions & 5 deletions roles/network-batman/handlers/main.yml

This file was deleted.

17 changes: 0 additions & 17 deletions roles/network-batman/tasks/main.yml

This file was deleted.

15 changes: 0 additions & 15 deletions roles/network-batman/templates/batman.j2

This file was deleted.

44 changes: 0 additions & 44 deletions roles/network-fastd/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions roles/network-fastd/handlers/main.yml

This file was deleted.

18 changes: 0 additions & 18 deletions roles/network-fastd/tasks/main.yml

This file was deleted.

6 changes: 3 additions & 3 deletions roles/network-ffrl/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: reload network interfaces
- name: restart networkd
systemd:
name: networking
state: reloaded
name: systemd-networkd
state: restarted
35 changes: 27 additions & 8 deletions roles/network-ffrl/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
---
- name: create ffrl interfaces
- name: create ffrl-nat.netdev
template:
src: ffrl.j2
dest: "/etc/network/interfaces.d/{{ item.key }}"
notify: reload network interfaces
src: ffrl-gre.netdev.j2
dest: "/etc/systemd/network/{{ item.key }}.netdev"
notify: restart networkd
loop: "{{ ffrl_exit_server | dict2items }}"

- name: create ffrl-nat dummy interface
- name: create ffrl-nat.network
template:
src: ffrl_nat.j2
dest: "/etc/network/interfaces.d/ffrl-nat"
notify: reload network interfaces
src: ffrl-gre.network.j2
dest: "/etc/systemd/network/{{ item.key }}.network"
notify: restart networkd
loop: "{{ ffrl_exit_server | dict2items }}"

- name: create ffrl-nat.netdev
template:
src: ffrl-nat.netdev.j2
dest: "/etc/systemd/network/ffrl-nat.netdev"
notify: restart networkd

- name: create ffrl-nat.network
template:
src: ffrl-nat.network.j2
dest: "/etc/systemd/network/ffrl-nat.network"
notify: restart networkd

- name: create ffrl-tunnel.conf
template:
src: ffrl-tunnel.conf.j2
dest: "/etc/systemd/network/{{ ansible_default_ipv4.interface }}.network.d/ffrl-tunnel.conf"
notify: restart networkd

- name: flush handlers
meta: flush_handlers
Loading

0 comments on commit c8f2a8d

Please sign in to comment.