summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-03 18:16:14 +0100
committermh <mh@immerda.ch>2013-01-03 18:16:14 +0100
commit19faa5112c736788ac0ad73eaad8009267be0ad0 (patch)
treeaad3070f9c85d26738a0836ac16aa061150fe3c7
parent8c0be5689023b85062fe88e6e19131ac4248c4cb (diff)
make it possible to configure a right subnet
-rw-r--r--manifests/remote_host.pp1
-rw-r--r--templates/remote_host.erb3
2 files changed, 4 insertions, 0 deletions
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