Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

kbp_webdav

  • Loading branch information...
commit 42b0eebd655e727ec31d144f6680287961b2cbdf 1 parent e04ee0c
Natasja Kranendonk authored
Showing with 40 additions and 0 deletions.
  1. +40 −0 kbp_webdav/manifests/init.pp
View
40 kbp_webdav/manifests/init.pp
@@ -0,0 +1,40 @@
+# Author: Kumina bv <support@kumina.nl>
+
+# Class: kbp_webdav
+#
+# Actions:
+# Setup webdav
+#
+class kbp_webdav {
+ include gen_davfs
+}
+
+# Define: kbp_webdav::mount
+#
+# Actions:
+# Setup webdav
+#
+# Parameters:
+# name: Directory to use as mountpoint. Will be created if not there.
+# webdav_source: Source to mount at mountpoint.
+# dir_mode: Permissons to use for the directory. Defaults to 775.
+#
+define kbp_webdav::mount ($webdav_source, $dir_mode=775) {
+ include kbp_webdav
+
+ file { $name:
+ ensure => directory,
+ mode => $dir_mode;
+ }
+
+ mount { $name:
+ ensure => mounted,
+ device => $webdav_source,
+ options => 'rw',
+ fstype => 'davfs',
+ remounts => false,
+ require => File['/etc/davfs2/davfs2.conf'];
+ }
+
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.