Add roles network-loopback + network-anycast

This commit is contained in:
Tobias Hachmer 2018-10-31 20:21:39 +01:00
parent 9a36b84a5f
commit 678312c7fc
No known key found for this signature in database
GPG key ID: E112788464CA5C60
10 changed files with 63 additions and 0 deletions

View file

@ -6,6 +6,8 @@
- prerequisites
- server-apt-repos
- server-basic
- network-loopback
- network-anycast
- users
- system-sysctl
- git-repos

View file

@ -6,6 +6,7 @@
- prerequisites
- server-apt-repos
- server-basic
- network-loopback
- users
- system-sysctl
- git-repos

View 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

View file

@ -0,0 +1,5 @@
---
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -0,0 +1,6 @@
---
- name: create anycast interface
template:
src: anycast.j2
dest: "/etc/network/interfaces.d/anycast"
notify: reload network interfaces

View 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') }}

View 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

View file

@ -0,0 +1,5 @@
---
- name: reload network interfaces
systemd:
name: networking
state: reloaded

View file

@ -0,0 +1,6 @@
---
- name: create loopback interface
template:
src: loopback.j2
dest: "/etc/network/interfaces.d/loopback"
notify: reload network interfaces

View 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