Add roles network-loopback + network-anycast
This commit is contained in:
parent
767e1fe5e1
commit
d66f880539
10 changed files with 63 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
||||||
- prerequisites
|
- prerequisites
|
||||||
- server-apt-repos
|
- server-apt-repos
|
||||||
- server-basic
|
- server-basic
|
||||||
|
- network-loopback
|
||||||
|
- network-anycast
|
||||||
- users
|
- users
|
||||||
- system-sysctl
|
- system-sysctl
|
||||||
- git-repos
|
- git-repos
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
- prerequisites
|
- prerequisites
|
||||||
- server-apt-repos
|
- server-apt-repos
|
||||||
- server-basic
|
- server-basic
|
||||||
|
- network-loopback
|
||||||
- users
|
- users
|
||||||
- system-sysctl
|
- system-sysctl
|
||||||
- git-repos
|
- git-repos
|
||||||
|
|
11
roles/network-anycast/README.md
Normal file
11
roles/network-anycast/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Ansible role network-anycast
|
||||||
|
|
||||||
|
Diese Ansible role konfiguriert das FFMWU Anycast Interface.
|
||||||
|
|
||||||
|
- dummy interface
|
||||||
|
- Anycast IP
|
||||||
|
|
||||||
|
## Benötigte Variablen
|
||||||
|
|
||||||
|
- ffmwu_anycast_ipv4 # Anycast IPv4 Adresse
|
||||||
|
- ffmwu_anycast_ipv6 # Anycast IPv6 Adresse
|
5
roles/network-anycast/handlers/main.yml
Normal file
5
roles/network-anycast/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
6
roles/network-anycast/tasks/main.yml
Normal file
6
roles/network-anycast/tasks/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: create anycast interface
|
||||||
|
template:
|
||||||
|
src: anycast.j2
|
||||||
|
dest: "/etc/network/interfaces.d/anycast"
|
||||||
|
notify: reload network interfaces
|
8
roles/network-anycast/templates/anycast.j2
Normal file
8
roles/network-anycast/templates/anycast.j2
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
#
|
||||||
|
auto anycast
|
||||||
|
iface anycast
|
||||||
|
link-type dummy
|
||||||
|
address {{ ffmwu_anycast_ipv4 | ipaddr('network/prefix') }}
|
||||||
|
address {{ ffmwu_anycast_ipv6 | ipaddr('network/prefix') }}
|
11
roles/network-loopback/README.md
Normal file
11
roles/network-loopback/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Ansible role network-loopback
|
||||||
|
|
||||||
|
Diese Ansible role konfiguriert das FFMWU Loopback Interface.
|
||||||
|
|
||||||
|
- dummy interface
|
||||||
|
- Loopback IP
|
||||||
|
|
||||||
|
## Benötigte Variablen
|
||||||
|
|
||||||
|
- ffmwu_loopback_net_ipv4 # IPv4-Subnetz aus dem die Loopback IPs berechnet werden
|
||||||
|
- ffmwu_loopback_net_ipv6 # IPv6-Subnetz aus dem die Loopback IPs berechnet werden
|
5
roles/network-loopback/handlers/main.yml
Normal file
5
roles/network-loopback/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reload network interfaces
|
||||||
|
systemd:
|
||||||
|
name: networking
|
||||||
|
state: reloaded
|
6
roles/network-loopback/tasks/main.yml
Normal file
6
roles/network-loopback/tasks/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: create loopback interface
|
||||||
|
template:
|
||||||
|
src: loopback.j2
|
||||||
|
dest: "/etc/network/interfaces.d/loopback"
|
||||||
|
notify: reload network interfaces
|
8
roles/network-loopback/templates/loopback.j2
Normal file
8
roles/network-loopback/templates/loopback.j2
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
#
|
||||||
|
auto loopback
|
||||||
|
iface loopback
|
||||||
|
link-type dummy
|
||||||
|
address {{ ffmwu_loopback_net_ipv4 | ipsubnet(32, magic) | ipaddr('network/prefix') }}
|
||||||
|
address {{ ffmwu_loopback_net_ipv6 | ipaddr(magic) | ipaddr('address') }}/128
|
Loading…
Reference in a new issue