summaryrefslogtreecommitdiff
path: root/manifests/vhost/davdir.pp
diff options
context:
space:
mode:
authorAndreas <andreas@immerda.ch>2009-12-26 21:05:18 +0100
committerAndreas <andreas@immerda.ch>2009-12-26 21:05:18 +0100
commit2cad483fa8b6b216144ee633d40acb577b0b56fc (patch)
tree00723a0f50bba3fcc8fd59bd13f45722f12276bf /manifests/vhost/davdir.pp
parenta395ba844c86232f7f179b773394a72d8e9421d3 (diff)
DAV needs a writable dir for the db (with itk, with the correct user settings)
Diffstat (limited to 'manifests/vhost/davdir.pp')
-rw-r--r--manifests/vhost/davdir.pp40
1 files changed, 40 insertions, 0 deletions
diff --git a/manifests/vhost/davdir.pp b/manifests/vhost/davdir.pp
new file mode 100644
index 0000000..341d632
--- /dev/null
+++ b/manifests/vhost/davdir.pp
@@ -0,0 +1,40 @@
+define apache::vhost::davdir(
+ $ensure = present,
+ $dav_db_dir = 'absent',
+ $documentroot_owner = apache,
+ $documentroot_group = 0,
+ $documentroot_mode = 0750,
+ $run_mode = 'normal',
+ $run_uid = 'absent'
+){
+ # php db dir
+ case $dav_db_dir {
+ 'absent': {
+ include apache::defaultdavdir
+ $real_dav_db_dir = "/var/www/dav_db_dir/$name"
+ }
+ default: { $real_dav_db_dir = $dav_db_dir }
+ }
+
+ case $ensure {
+ absent: {
+ file{$real_dav_db_dir:
+ ensure => absent,
+ purge => true,
+ force => true,
+ recurse => true,
+ }
+ }
+ default: {
+ file{$real_dav_db_dir:
+ ensure => directory,
+ owner => $run_mode ? {
+ 'itk' => $run_uid,
+ default => $documentroot_owner
+ },
+ group => $documentroot_group, mode => $documentroot_mode;
+ }
+ }
+ }
+}
+