diff --git a/manifests/instance.pp b/manifests/instance.pp index a8759d3..4165efc 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -9,6 +9,7 @@ define tinc::instance( $port_to_export = '655', $compression = '10', $mode = 'switch', + $options = {}, $tinc_up_content = undef, $tinc_down_content = undef, ){ diff --git a/manifests/switch.pp b/manifests/switch.pp index 3c7e65b..264c570 100644 --- a/manifests/switch.pp +++ b/manifests/switch.pp @@ -12,6 +12,7 @@ define tinc::switch( $tinc_internal_netmask = 'absent', $tinc_bridge_interface = 'absent', $compression = '10', + $options = {}, $shorewall_zone = 'absent' ){ @@ -25,6 +26,7 @@ define tinc::switch( port_to_export => $port_to_export, compression => $compression, mode => 'switch', + options => $options, } if $ensure == 'present' { diff --git a/templates/tinc.conf-header.erb b/templates/tinc.conf-header.erb index 3e96283..d24ac34 100644 --- a/templates/tinc.conf-header.erb +++ b/templates/tinc.conf-header.erb @@ -1,9 +1,10 @@ Name = <%= @fqdn_tinc %> AddressFamily = ipv4 Device = /dev/net/tun -#PMTU = 1440 Mode = <%= @mode %> BindToAddress = <%= @host_address %> <%= @port %> BindToInterface = <%= @tinc_interface.to_s %> - +<% @options.keys.sort.each do |key| -%> +<%= key %> = <%= @options[key] %> +<% end -%>