diff options
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 9f0a38e..9544102 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -20,6 +20,7 @@ class strongswan::base { mode => '0400', } + $binary_name = basename($strongswan::binary) file{ '/etc/ipsec.secrets': content => ": RSA ${::fqdn}.pem\n"; @@ -34,6 +35,10 @@ class strongswan::base { ensure => 'present'; '/etc/ipsec.conf': content => template('strongswan/ipsec.conf.erb'); + "/usr/local/sbin/${binary_name}_connected_hosts": + content => "#!/bin/bash\n${strongswan::binary} status | grep ESTABLISHED | awk -F\[ '{ print \$1 }'\n", + notify => undef, + mode => '0500'; } service{'ipsec': |