summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp12
1 files changed, 12 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 5458ed8..35555f6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -43,6 +43,18 @@ class strongswan(
}
}
+ if $auto_remote_host and ($::strongswan_cert != 'false') and ($::strongswan_cert != '') {
+ # export myself
+ @@strongswan::remote_host{$::fqdn:
+ right_cert_content => $::strongswan_cert,
+ right_ip_address => $strongswan::default_left_ip_address,
+ 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 |>>
+ }
+
if $manage_shorewall {
class{'shorewall::rules::ipsec':
source => $strongswan::shorewall_source