From 2b2d2627e345ad2829184c009ad4ed827d39124f Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Sun, 20 Aug 2023 12:05:53 +0200 Subject: Add ansible tinc config --- roles/router/templates/tinc-up.j2 | 4 ++++ roles/router/templates/tinc.conf.j2 | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100755 roles/router/templates/tinc-up.j2 create mode 100644 roles/router/templates/tinc.conf.j2 (limited to 'roles/router/templates') 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 %} -- cgit v1.2.3