summaryrefslogtreecommitdiff
path: root/puppet/modules/apache/manifests/vhost/file/documentrootdir.pp
blob: 425406ad4bc2042cb4f3dc52491d07582c31f4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
define apache::vhost::file::documentrootdir(
      $ensure = directory,
      $documentroot,
      $filename,
      $thedomain,
      $owner = 'root',
      $group = '0',
      $mode = 440
){
  file{"$documentroot/$filename":
    require => Apache::Vhost::Webdir["$thedomain"],
    owner => $owner, group => $group, mode => $mode;
  }
  if $ensure != 'absent' {
    File["$documentroot/$filename"]{
      ensure => directory,
    }
  } else {
    File["$documentroot/$filename"]{
      ensure => $ensure,
    }
  }
}