diff options
author | uvok cheetah | 2024-03-01 18:36:26 +0100 |
---|---|---|
committer | uvok cheetah | 2024-03-01 18:36:26 +0100 |
commit | bb17d97096e99f0f566a6054146b247eea2bf645 (patch) | |
tree | 4bd54738e210f550ca45c034dc57204a61f68217 /roles/tinc/templates | |
parent | 39d57540d76b39c82a9cfe47c8b72c30e64b0e0a (diff) |
Split router and tinc config
Diffstat (limited to 'roles/tinc/templates')
-rwxr-xr-x | roles/tinc/templates/tinc-up.j2 | 9 | ||||
-rw-r--r-- | roles/tinc/templates/tinc.conf.j2 | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/roles/tinc/templates/tinc-up.j2 b/roles/tinc/templates/tinc-up.j2 new file mode 100755 index 0000000..8c26aa9 --- /dev/null +++ b/roles/tinc/templates/tinc-up.j2 @@ -0,0 +1,9 @@ +#!/bin/sh +ip link set $INTERFACE up +ip -6 addr flush dev $INTERFACE +ip addr add {{ tinc.address }} dev $INTERFACE +{% if tinc.extra_up is defined %} +{% for cmd in tinc.extra_up %} +{{ cmd }} +{% endfor %} +{% endif %} diff --git a/roles/tinc/templates/tinc.conf.j2 b/roles/tinc/templates/tinc.conf.j2 new file mode 100644 index 0000000..b7011e1 --- /dev/null +++ b/roles/tinc/templates/tinc.conf.j2 @@ -0,0 +1,11 @@ +Name = {{ tinc.name }} +{% if tinc.listen_on is defined %} +AddressFamily = {{ tinc.listen_on }} +{% else %} +AddressFamily = ipv6 +{% endif %} +Interface = tn_int +Mode = switch +{% for conn in tinc.connections %} +ConnectTo = {{ conn }} +{% endfor %} |