diff --git a/manifests/instance.pp b/manifests/instance.pp index d4fce3a..6839516 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -113,29 +113,43 @@ define tinc::instance( mode => '0600'; } # export this host and collect all the other hosts - @@tinc::host{"${fqdn_tinc}@${name}": + # @@tinc::host{"${fqdn_tinc}@${name}": + # port => $port, + # compression => $compression, + # address => $host_address, + # public_key => $tinc_keys[1], + # tag => "tinc::host_for_${name}", + # } + # Tinc::Host<<| tag == "tinc::host_for_${name}" |>> + + tinc::host{"${fqdn_tinc}@${name}": port => $port, compression => $compression, address => $host_address, public_key => $tinc_keys[1], tag => "tinc::host_for_${name}", } - Tinc::Host<<| tag == "tinc::host_for_${name}" |>> - + concat::fragment{"tinc_conf_header_${name}": target => $tinc_config, content => template('tinc/tinc.conf-header.erb'), order => '100', } - @@tinc::connect_to{"${name}_connect_to_${fqdn_tinc}": + # @@tinc::connect_to{"${name}_connect_to_${fqdn_tinc}": + # to => $fqdn_tinc, + # to_fqdn => $::fqdn, + # target => $tinc_config, + # tag => "tinc_${name}_auto", + # Tinc::Connect_to<<| tag == "tinc_${name}_auto" |>> + + tinc::connect_to{"${name}_connect_to_${fqdn_tinc}": to => $fqdn_tinc, to_fqdn => $::fqdn, target => $tinc_config, tag => "tinc_${name}_auto", } - Tinc::Connect_to<<| tag == "tinc_${name}_auto" |>> - + file { "/etc/tinc/${name}/tinc-up": content => $tinc_up_content, notify => Service[$service_name], diff --git a/manifests/switch.pp b/manifests/switch.pp index ffe73e8..2f28360 100644 --- a/manifests/switch.pp +++ b/manifests/switch.pp @@ -25,7 +25,7 @@ define tinc::switch( if $ensure == 'present' { include ::tinc - require bridge_utils + # require bridge_utils $real_tinc_bridge_interface = $tinc_bridge_interface ? { 'absent' => "br${name}", default => $tinc_bridge_interface