summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 02:26:25 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 02:26:25 +0100
commitdd28dcf3d620a4ac7d0a1532b812213cf094cd3c (patch)
treea3fa8c8ef446de2bcc2f317bceb4bca868f7e0f0 /manifests/init.pp
parentMove webdav into profiles. (diff)
downloadwebdav_server-dd28dcf3d620a4ac7d0a1532b812213cf094cd3c.tar.gz
webdav_server-dd28dcf3d620a4ac7d0a1532b812213cf094cd3c.tar.xz
Revert "Move webdav into profiles."
It actually reverts the non-need for the nginx module webdav_ext. Since Omnifocus requires PROPFIND. This reverts commit edf6ffe8b399679ba28cc5e558a6838919dd1ee8.
Diffstat (limited to '')
-rw-r--r--manifests/init.pp (renamed from modules/profiles/manifests/webdav.pp)26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/profiles/manifests/webdav.pp b/manifests/init.pp
index bd586f6..f1a836c 100644
--- a/modules/profiles/manifests/webdav.pp
+++ b/manifests/init.pp
@@ -1,13 +1,13 @@
-class profiles::webdav (
+define webdav_server (
String $nginx_server,
String $file_path,
- String $location,
+ String $location = $name,
String $passwd_file = "${file_path}/.htpasswd",
String $owner = 'http',
String $group = 'share',
Array[Array[String,2,2]] $users = [],
Array[String] $dav_methods = ['PUT', 'DELETE', 'MKCOL', 'COPY', 'MOVE'],
- # Array[String] $dav_ext_methods = ['PROPFIND', 'OPTIONS'],
+ Array[String] $dav_ext_methods = ['PROPFIND', 'OPTIONS'],
Hash[String,String] $dav_access = {
'user' => 'rw',
'group' => 'rw',
@@ -19,15 +19,15 @@ class profiles::webdav (
require ::nginx
- # $modname = 'ngx_http_dav_ext_module'
- # # This assumes that the directory exists, and that
- # # nginx::include_modules_enabled => true
- # file { "/etc/nginx/modules-enabled/${modname}.conf":
- # ensure => file,
- # content => @("EOF")
- # load_module /usr/lib/nginx/modules/${modname}.so;
- # | EOF
- # }
+ $modname = 'ngx_http_dav_ext_module'
+ # This assumes that the directory exists, and that
+ # nginx::include_modules_enabled => true
+ file { "/etc/nginx/modules-enabled/${modname}.conf":
+ ensure => file,
+ content => @("EOF")
+ load_module /usr/lib/nginx/modules/${modname}.so;
+ | EOF
+ }
$lines = $users.map |$pair| { $pair.join(':') }.join("\n")
@@ -62,7 +62,7 @@ class profiles::webdav (
location_cfg_append => {
'dav_methods' => $dav_methods.join(' '),
- # 'dav_ext_methods' => $dav_ext_methods.join(' '),
+ 'dav_ext_methods' => $dav_ext_methods.join(' '),
'dav_access' => $dav_access.map |$k, $v| { "${k}:${v}" }.join(' '),
'client_body_temp_path' => "${file_path}/tmp",
'create_full_put_path' => 'on',