# host <%= name %> <% if !(right_id =~ /#{scope.lookupvar('::fqdn')}/) -%> <% Array(right_ip_address).each_with_index do |right_ip,i| -%> conn <%= name %><% if i > 0 -%>-<%= i %><% end -%> <% end -%> <% if left_ip_address != 'absent' -%> left=<%= left_ip_address %> <% end -%> <% if left_id != 'absent' -%> leftid=@<%= left_id %> <% end -%> <% unless left_subnet.empty? -%> leftsubnet=<%= left_subnet.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %> <% end -%> right=<%= right_ip %> rightid=@<%= right_id %> rightcert=<%= right_cert_name %>.asc <% unless right_subnet.empty? -%> rightsubnet=<%= right_subnet.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %> <% end -%> type=transport auto=start <% else -%> # placeholder to not add ourself to the hostlist # this is due to a limitations how puppet can collect # exported resources <% end -%>