summaryrefslogtreecommitdiff
path: root/ansible/roles/router/templates/ifupdown-switch
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/router/templates/ifupdown-switch')
-rw-r--r--ansible/roles/router/templates/ifupdown-switch14
1 files changed, 14 insertions, 0 deletions
diff --git a/ansible/roles/router/templates/ifupdown-switch b/ansible/roles/router/templates/ifupdown-switch
new file mode 100644
index 0000000..d8d4ec5
--- /dev/null
+++ b/ansible/roles/router/templates/ifupdown-switch
@@ -0,0 +1,14 @@
+auto br0
+iface br0 inet static
+ address 10.0.0.4
+ netmask 255.255.255.0
+ gateway 10.0.0.255
+ pre-up ip link add name $IFACE type bridge
+{% for i in range(1, 4) %}
+
+auto eth{{i}}
+iface eth{{i}} inet manual
+ up ip link set $IFACE up
+ post-up ip addr flush dev $IFACE
+ post-up ip link set $IFACE master br0
+{% endfor %}