summaryrefslogtreecommitdiff
path: root/manifests/vhost/davdbdir.pp
diff options
context:
space:
mode:
authorAndreas <andreas@immerda.ch>2009-12-26 22:08:14 +0100
committerAndreas <andreas@immerda.ch>2009-12-26 22:08:14 +0100
commit0ff978e88d136b45a39eda4c7114d5238ebb78ff (patch)
tree892f4c9146c6c68defe73673845f374bafb710a2 /manifests/vhost/davdbdir.pp
parent2cad483fa8b6b216144ee633d40acb577b0b56fc (diff)
changed davdir->davdbdir, add to template
Diffstat (limited to 'manifests/vhost/davdbdir.pp')
-rw-r--r--manifests/vhost/davdbdir.pp40
1 files changed, 40 insertions, 0 deletions
diff --git a/manifests/vhost/davdbdir.pp b/manifests/vhost/davdbdir.pp
new file mode 100644
index 0000000..a9528f7
--- /dev/null
+++ b/manifests/vhost/davdbdir.pp
@@ -0,0 +1,40 @@
+define apache::vhost::davdbdir(
+ $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::defaultdavdbdir
+ $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;
+ }
+ }
+ }
+}
+