diff options
| author | alex <alex@pdp7.net> | 2023-01-14 19:11:18 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-01-14 19:11:18 +0100 |
| commit | b7e8dca0b38999b361b108e852c47ebd1ab77938 (patch) | |
| tree | 9529dbe07949a24322f44e6a521cd2fedc2529b3 /personal_infra/puppet/modules/tinc/templates | |
| parent | f202c78c39c7cf7aba88eaf61f91c9c0ffb8e5a2 (diff) | |
Add tinc management
Diffstat (limited to 'personal_infra/puppet/modules/tinc/templates')
| -rw-r--r-- | personal_infra/puppet/modules/tinc/templates/tinc-up.epp | 11 | ||||
| -rw-r--r-- | personal_infra/puppet/modules/tinc/templates/tinc.conf.epp | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/personal_infra/puppet/modules/tinc/templates/tinc-up.epp b/personal_infra/puppet/modules/tinc/templates/tinc-up.epp new file mode 100644 index 00000000..7c89098f --- /dev/null +++ b/personal_infra/puppet/modules/tinc/templates/tinc-up.epp @@ -0,0 +1,11 @@ +<%- | $ip, + $netmask, + $tinc_other_networks, +| -%> +#!/bin/sh + +ifconfig $INTERFACE <%= $ip %> netmask 255.255.255.255 + +<% $tinc_other_networks.each |$tinc_other_network| { %> + route add -net <%= $tinc_other_network %> dev $INTERFACE +<% } %> diff --git a/personal_infra/puppet/modules/tinc/templates/tinc.conf.epp b/personal_infra/puppet/modules/tinc/templates/tinc.conf.epp new file mode 100644 index 00000000..959fb949 --- /dev/null +++ b/personal_infra/puppet/modules/tinc/templates/tinc.conf.epp @@ -0,0 +1,8 @@ +<%- | $tinc_name, + $tinc_location, + $tinc_connect_to, +| -%> +Name = <%= $tinc_location %> +<% $tinc_connect_to.each | $tinc_connection | { -%> +ConnectTo = <%= $tinc_connection %> +<% } %> |
