From 770bc48ae57ca4ffb8294c8f96841a28ade8a9cf Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 4 Jan 2013 16:40:17 +0100 Subject: make it possible to also define left parts --- templates/remote_host.erb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'templates') diff --git a/templates/remote_host.erb b/templates/remote_host.erb index a05378c..9dff955 100644 --- a/templates/remote_host.erb +++ b/templates/remote_host.erb @@ -1,5 +1,14 @@ # host <%= name %> conn <%= name %> +<% 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_address %> rightid=@<%= right_id %> rightcert=<%= right_cert_name %>.asc -- cgit v1.2.3