make it possible to pass a hash of options for further configuration
This commit is contained in:
parent
849c4dba1f
commit
4e80b272f6
3 changed files with 6 additions and 2 deletions
|
@ -9,6 +9,7 @@ define tinc::instance(
|
||||||
$port_to_export = '655',
|
$port_to_export = '655',
|
||||||
$compression = '10',
|
$compression = '10',
|
||||||
$mode = 'switch',
|
$mode = 'switch',
|
||||||
|
$options = {},
|
||||||
$tinc_up_content = undef,
|
$tinc_up_content = undef,
|
||||||
$tinc_down_content = undef,
|
$tinc_down_content = undef,
|
||||||
){
|
){
|
||||||
|
|
|
@ -12,6 +12,7 @@ define tinc::switch(
|
||||||
$tinc_internal_netmask = 'absent',
|
$tinc_internal_netmask = 'absent',
|
||||||
$tinc_bridge_interface = 'absent',
|
$tinc_bridge_interface = 'absent',
|
||||||
$compression = '10',
|
$compression = '10',
|
||||||
|
$options = {},
|
||||||
$shorewall_zone = 'absent'
|
$shorewall_zone = 'absent'
|
||||||
){
|
){
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@ define tinc::switch(
|
||||||
port_to_export => $port_to_export,
|
port_to_export => $port_to_export,
|
||||||
compression => $compression,
|
compression => $compression,
|
||||||
mode => 'switch',
|
mode => 'switch',
|
||||||
|
options => $options,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ensure == 'present' {
|
if $ensure == 'present' {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
Name = <%= @fqdn_tinc %>
|
Name = <%= @fqdn_tinc %>
|
||||||
AddressFamily = ipv4
|
AddressFamily = ipv4
|
||||||
Device = /dev/net/tun
|
Device = /dev/net/tun
|
||||||
#PMTU = 1440
|
|
||||||
Mode = <%= @mode %>
|
Mode = <%= @mode %>
|
||||||
|
|
||||||
BindToAddress = <%= @host_address %> <%= @port %>
|
BindToAddress = <%= @host_address %> <%= @port %>
|
||||||
BindToInterface = <%= @tinc_interface.to_s %>
|
BindToInterface = <%= @tinc_interface.to_s %>
|
||||||
|
<% @options.keys.sort.each do |key| -%>
|
||||||
|
<%= key %> = <%= @options[key] %>
|
||||||
|
<% end -%>
|
||||||
|
|
Loading…
Reference in a new issue