summaryrefslogtreecommitdiff
path: root/templates/remote_host.erb
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-08-10 18:33:09 +0200
committermh <mh@immerda.ch>2013-08-10 18:33:09 +0200
commit9c90e6ae9d73e762fadde4e66edc5ccb02c69467 (patch)
treed5f8b2508f76a33c7ef2dbaa167d2f2f3fa31d6f /templates/remote_host.erb
parentce1b40c24305aa377fc7ae73cdf8d6f8351e7aef (diff)
Revert "clear line"
This reverts commit ce1b40c24305aa377fc7ae73cdf8d6f8351e7aef.
Diffstat (limited to 'templates/remote_host.erb')
-rw-r--r--templates/remote_host.erb22
1 files changed, 10 insertions, 12 deletions
diff --git a/templates/remote_host.erb b/templates/remote_host.erb
index 4f35478..52639cd 100644
--- a/templates/remote_host.erb
+++ b/templates/remote_host.erb
@@ -1,23 +1,21 @@
# 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' -%>
+conn <%= name %>
+<% if left_ip_address != 'absent' -%>
left=<%= left_ip_address %>
-<% end -%>
-<% if left_id != 'absent' -%>
+<% end -%>
+<% if left_id != 'absent' -%>
leftid=@<%= left_id %>
-<% end -%>
-<% unless left_subnet.empty? -%>
+<% end -%>
+<% unless left_subnet.empty? %>
leftsubnet=<%= left_subnet.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %>
-<% end -%>
- right=<%= right_ip %>
+<% end -%>
+ right=<%= right_ip_address %>
rightid=@<%= right_id %>
rightcert=<%= right_cert_name %>.asc
-<% unless right_subnet.empty? -%>
+<% unless right_subnet.empty? -%>
rightsubnet=<%= right_subnet.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %>
-<% end -%>
+<% end -%>
type=transport
auto=start
<% else -%>