From f1da3f6ffe640f45ab74521f55389af504375b74 Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 10 Aug 2013 20:10:23 +0200 Subject: make hostname configurable --- templates/ipsec.conf.erb | 4 ++-- templates/remote_host.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/ipsec.conf.erb b/templates/ipsec.conf.erb index 44225d3..c61b765 100644 --- a/templates/ipsec.conf.erb +++ b/templates/ipsec.conf.erb @@ -13,8 +13,8 @@ conn %default rightsendcert=never leftsendcert=never left=<%= scope.lookupvar('strongswan::default_left_ip_address') %> - leftcert=<%= scope.lookupvar('::fqdn') %>.asc - leftid=@<%= scope.lookupvar('::fqdn') %> + leftcert=<%= scope.lookupvar('custom_hostname') %>.asc + leftid=@<%= scope.lookupvar('custom_hostname') %> <% unless (subn=scope.lookupvar('strongswan::default_left_subnet')).empty? -%> leftsubnet=<%= subn.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %> <% end -%> diff --git a/templates/remote_host.erb b/templates/remote_host.erb index dbe3945..2c70a37 100644 --- a/templates/remote_host.erb +++ b/templates/remote_host.erb @@ -1,5 +1,5 @@ # host <%= name %> -<% if !(right_id =~ /#{scope.lookupvar('::fqdn')}/) -%> +<% if !(right_id =~ /#{scope.lookupvar('custom_hostname')}/) -%> conn <%= name %> <% if left_ip_address != 'absent' -%> left=<%= left_ip_address %> -- cgit v1.2.3