summaryrefslogtreecommitdiff
path: root/ansible/roles/router/templates/ifupdown-switch
diff options
context:
space:
mode:
authorIvan Dolgov <ivan@qvarnlabs.com>2016-09-13 11:51:32 +0300
committerLars Wirzenius <liw@liw.fi>2016-09-26 16:10:09 +0300
commitef137489a2af825da682169ed3a532c452e4f68c (patch)
tree70930116aa6186fddfedcb0649008762d23cad76 /ansible/roles/router/templates/ifupdown-switch
parent92294c460d9a4442fc255ae393e94aa982e76252 (diff)
downloadminipc-router-ef137489a2af825da682169ed3a532c452e4f68c.tar.gz
Add hotspot
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 %}