summaryrefslogtreecommitdiff
path: root/manifests/vhost/file/documentrootfile.pp
blob: c9daf9ceb2180062d8fbe29e697c1c6be9e0035b (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
25
define apache::vhost::file::documentrootfile(
      $documentroot,
      $filename,
      $thedomain,
      $owner='root',
      $group='0',
      $mode=440
){
    file{"$documentroot/$filename":
        source  => [ "puppet://$server/files/apache/vhost_varieties/$fqdn/$thedomain/$filename",
                    "puppet://$server/files/apache/vhost_varieties/$apache_cluster_node/$thedomain/$filename",
                    "puppet://$server/files/apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename",
                    "puppet://$server/files/apache/vhost_varieties/$operatingsystem/$thedomain/$filename",
                    "puppet://$server/files/apache/vhost_varieties/$thedomain/$filename",
                    "puppet://$server/apache/vhost_varieties/$thedomain/$filename",
                    "puppet://$server/apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename",
                    "puppet://$server/apache/vhost_varieties/$operatingsystem/$thedomain/$filename",
                    "puppet://$server/apache/vhost_varieties/$thedomain/$filename"
                   ],
        ensure  => file,
        require => Apache::Vhost::Webdir["$thedomain"],
        owner => $owner, group => $group, mode => $mode;
    }
}