summaryrefslogtreecommitdiff
path: root/puppet/modules/site_openvpn/manifests/server_config.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_openvpn/manifests/server_config.pp')
-rw-r--r--puppet/modules/site_openvpn/manifests/server_config.pp17
1 files changed, 14 insertions, 3 deletions
diff --git a/puppet/modules/site_openvpn/manifests/server_config.pp b/puppet/modules/site_openvpn/manifests/server_config.pp
index de273b46..6106cfbb 100644
--- a/puppet/modules/site_openvpn/manifests/server_config.pp
+++ b/puppet/modules/site_openvpn/manifests/server_config.pp
@@ -52,18 +52,29 @@
# note: the default is BF-CBC (blowfish)
#
-define site_openvpn::server_config ($port, $proto, $local, $server, $push, $management ) {
+define site_openvpn::server_config(
+ $port, $proto, $local, $server, $push,
+ $management, $tls_remote = undef) {
$openvpn_configname = $name
concat {
- "/etc/openvpn/$openvpn_configname.conf":
+ "/etc/openvpn/${openvpn_configname}.conf":
owner => root,
group => root,
mode => 644,
warn => true,
require => File['/etc/openvpn'],
- notify => Service['openvpn'];
+ notify => Exec['restart_openvpn'];
+ }
+
+ if $tls_remote != undef {
+ openvpn::option {
+ "tls-remote $openvpn_configname":
+ key => 'tls-remote',
+ value => $tls_remote,
+ server => $openvpn_configname;
+ }
}
openvpn::option {