summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp5
-rw-r--r--templates/remote_host.erb7
2 files changed, 9 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 35555f6..2767783 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -51,8 +51,9 @@ class strongswan(
right_subnet => $strongswan::default_left_subnet,
tag => 'strongswan_auto'
}
- # collect all other auto exported except myself
- Strongswan::Remote_Host<<| tag == 'strongswan_auto' and title != $::fqdn |>>
+ # collect all other auto exported
+ # myself is excluded in the template
+ Strongswan::Remote_Host<<| tag == 'strongswan_auto' |>>
}
if $manage_shorewall {
diff --git a/templates/remote_host.erb b/templates/remote_host.erb
index 9dff955..a67238e 100644
--- a/templates/remote_host.erb
+++ b/templates/remote_host.erb
@@ -1,4 +1,5 @@
# host <%= name %>
+<% if scope.lookupvar('::fqdn') != left_id -%>
conn <%= name %>
<% if left_ip_address != 'absent' -%>
left=<%= left_ip_address %>
@@ -17,4 +18,8 @@ conn <%= name %>
<% end -%>
type=transport
auto=start
-
+<% else -%>
+# placeholder to not add ourself to the hostlist
+# this is due to a limitations how puppet can collect
+# exported resources
+<% end -%>