summaryrefslogtreecommitdiff
path: root/roles/router/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/router/templates')
-rwxr-xr-xroles/router/templates/tinc-up.j24
-rw-r--r--roles/router/templates/tinc.conf.j27
2 files changed, 11 insertions, 0 deletions
diff --git a/roles/router/templates/tinc-up.j2 b/roles/router/templates/tinc-up.j2
new file mode 100755
index 0000000..93ab205
--- /dev/null
+++ b/roles/router/templates/tinc-up.j2
@@ -0,0 +1,4 @@
+#!/bin/sh
+ip link set $INTERFACE up
+ip -6 addr flush dev $INTERFACE
+ip addr add {{ tinc.address }} dev $INTERFACE
diff --git a/roles/router/templates/tinc.conf.j2 b/roles/router/templates/tinc.conf.j2
new file mode 100644
index 0000000..bc71107
--- /dev/null
+++ b/roles/router/templates/tinc.conf.j2
@@ -0,0 +1,7 @@
+Name = {{ tinc.name }}
+AddressFamily = ipv6
+Interface = tn_int
+Mode = switch
+{% for conn in tinc.connections %}
+ConnectTo = {{ conn }}
+{% endfor %}