summaryrefslogtreecommitdiff
path: root/manifests/option.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/option.pp')
-rw-r--r--manifests/option.pp17
1 files changed, 5 insertions, 12 deletions
diff --git a/manifests/option.pp b/manifests/option.pp
index 8c2a7a2..5cadb31 100644
--- a/manifests/option.pp
+++ b/manifests/option.pp
@@ -1,6 +1,6 @@
# option.pp
-define openvpn::option($ensure = present, $key, $value = "", $server, $client = "", $csc = false) {
+define openvpn::option($key, $value = "", $server, $client = "", $csc = false) {
$content = $value ? {
"" => "${key}",
default => "${key} ${value}"
@@ -8,24 +8,17 @@ define openvpn::option($ensure = present, $key, $value = "", $server, $client =
if $client == "" {
$path = "/etc/openvpn/${server}.conf"
- $req = File["/etc/openvpn"]
- $notify = Service["openvpn"]
} else {
if $csc {
$path = "/etc/openvpn/${server}/client-configs/${client}"
} else {
$path = "/etc/openvpn/${server}/download-configs/${client}/${client}.conf"
}
- $req = [ File["/etc/openvpn"], File["/etc/openvpn/${server}/download-configs/${client}"] ]
- $notify = undef
}
- common::concatfilepart {
- "${name}":
- ensure => $ensure,
- file => $path,
- content => "${content}\n",
- notify => $notify,
- require => $req;
+ concat::fragment {
+ "openvpn.${server}.${client}.${name}":
+ target => $path,
+ content => "${content}\n";
}
}