From 19faa5112c736788ac0ad73eaad8009267be0ad0 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 3 Jan 2013 18:16:14 +0100 Subject: make it possible to configure a right subnet --- manifests/remote_host.pp | 1 + templates/remote_host.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/remote_host.pp b/manifests/remote_host.pp index 72830f5..de7a729 100644 --- a/manifests/remote_host.pp +++ b/manifests/remote_host.pp @@ -1,6 +1,7 @@ # configure a simple remote host define strongswan::remote_host( $right_ip_address, + $right_subnet = [], $ensure = 'present', $right_id = $name, $right_cert_name = $name, diff --git a/templates/remote_host.erb b/templates/remote_host.erb index 4193506..5a22ca9 100644 --- a/templates/remote_host.erb +++ b/templates/remote_host.erb @@ -3,6 +3,9 @@ conn <%= name %> right=<%= right_ip_address %> rightid=@<%= right_id %> rightcert=<%= right_cert_name %>.asc +<% unless right_subnet.empty? -%> + rightsubnet=<%= right_subnet.join(',') %> +<% end -%> type=transport auto=start -- cgit v1.2.3