Add interface config (using ifupdown2)

This commit is contained in:
Markus 2017-03-27 17:40:34 +02:00
parent 2defb06c57
commit 40e6102c8c
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
- name: Reload interfaces
command: /sbin/ifreload -a

View File

@ -0,0 +1,17 @@
---
- name: Enable backports
apt_repository: repo='deb http://httpredir.debian.org/debian jessie-backports main' state=present
- name: Install dependencies
apt: name=python-pkg-resources
- name: Install ifupdown2
apt: name=ifupdown2 default_release=jessie-backports state=latest
- name: Uninstall ifupdown
apt: name=ifupdown state=absent
- name: Configure mesh interfaces
template: src=mesh.conf.j2 dest=/etc/network/interfaces.d/mesh.conf
notify: Reload interfaces

View File

@ -0,0 +1,28 @@
# {{ ansible_managed }}
# br-{{ site_code }}
auto br-{{ site_code }}
iface br-{{ site_code }}
bridge-fd 0
bridge-ports bat-{{ site_code }}
bridge-stp no
#
address {{ batman_ipv4 }}
address {{ batman_ipv6 }}
mtu 1500
# bat-{{ site_code }}
auto bat-{{ site_code }}
iface bat-{{ site_code }}
batman-hop-penalty 5
batman-ifaces dmy-{{ site_code }} vpn-{{ site_code }}
batman-ifaces-ignore-regex .*_.*
#
mtu 1500
# dmy-{{ site_code }}
auto dmy-{{ site_code }}
iface dmy-{{ site_code }}
hwaddress f2:00:90:00:{{ gateway_id }}:00
link-type dummy
mtu 1560

View File

@ -12,6 +12,7 @@
roles: roles:
- batman - batman
- fastd - fastd
- mesh-interfaces
- dns - dns
- name: Setup confluence server - name: Setup confluence server