summaryrefslogtreecommitdiff
path: root/puppet/modules/site_openvpn/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_openvpn/manifests')
-rw-r--r--puppet/modules/site_openvpn/manifests/server_config.pp23
1 files changed, 6 insertions, 17 deletions
diff --git a/puppet/modules/site_openvpn/manifests/server_config.pp b/puppet/modules/site_openvpn/manifests/server_config.pp
index 1af08b4a..5a47954a 100644
--- a/puppet/modules/site_openvpn/manifests/server_config.pp
+++ b/puppet/modules/site_openvpn/manifests/server_config.pp
@@ -1,14 +1,9 @@
define site_openvpn::server_config($port, $proto) {
- $openvpn_configname=$name
+ $openvpn_configname = $name
+
notice("Creating OpenVPN $openvpn_configname:
Port: $port, Protocol: $proto")
- file {
- "/etc/openvpn/${name}":
- ensure => directory,
- require => Package['openvpn'];
- }
-
concat {
"/etc/openvpn/$openvpn_configname.conf":
owner => root,
@@ -19,28 +14,22 @@ define site_openvpn::server_config($port, $proto) {
notify => Service['openvpn'];
}
-
-
openvpn::option {
"ca $openvpn_configname":
key => 'ca',
- value => '/etc/openvpn/ca.crt',
- #require => Exec["initca $openvpn_configname"],
+ value => '/etc/openvpn/keys/ca.crt',
server => $openvpn_configname;
"cert $openvpn_configname":
key => 'cert',
- value => "/etc/openvpn/$openvpn_configname/server.crt",
- #require => Exec["generate server cert $openvpn_configname"],
+ value => "/etc/openvpn/keys/server.crt",
server => $openvpn_configname;
"key $openvpn_configname":
key => "key",
- value => "/etc/openvpn/$openvpn_configname/server.key",
- #require => Exec["generate server cert $openvpn_configname"],
+ value => "/etc/openvpn/keys/server.key",
server => "$openvpn_configname";
"dh $openvpn_configname":
key => "dh",
- value => "/etc/openvpn/dh1024.pem",
- #require => Exec["generate dh param $openvpn_configname"],
+ value => "/etc/openvpn/keys/dh1024.pem",
server => "$openvpn_configname";
"dev $openvpn_configname":
key => "dev",