diff options
author | mh <mh@immerda.ch> | 2013-01-04 19:13:30 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2013-01-04 19:13:30 +0100 |
commit | 5381a99ba9dd9b14fe0d41aea8c1ab1b50700d6f (patch) | |
tree | 387e3570ba14a158dadc539ca17315fa34fec59c /manifests/base.pp | |
parent | 86c536e48d4f01762905fae47e10705d8e80e112 (diff) |
deploy a helper to get all connected hosts
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': |