summaryrefslogtreecommitdiff
path: root/puppet/modules/apache/manifests/vhost/file/documentrootfile.pp
blob: c5bc72a1654baf4aea18cf97d9b7f4bed639c471 (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
26
27
# place a file in the documentroot
define apache::vhost::file::documentrootfile(
  $documentroot,
  $filename,
  $thedomain,
  $owner        = 'root',
  $group        = '0',
  $mode         = '0440',
){
    file{"${documentroot}/${filename}":
        source  => [ "puppet:///modules/site_apache/vhost_varieties/${::fqdn}/${thedomain}/${filename}",
                    "puppet:///modules/site_apache/vhost_varieties/${apache::cluster_node}/${thedomain}/${filename}",
                    "puppet:///modules/site_apache/vhost_varieties/${::operatingsystem}.${::operatingsystemmajrelease}/${thedomain}/${filename}",
                    "puppet:///modules/site_apache/vhost_varieties/${::operatingsystem}/${thedomain}/${filename}",
                    "puppet:///modules/site_apache/vhost_varieties/${thedomain}/${filename}",
                    "puppet:///modules/apache/vhost_varieties/${thedomain}/${filename}",
                    "puppet:///modules/apache/vhost_varieties/${::operatingsystem}.${::operatingsystemmajrelease}/${thedomain}/${filename}",
                    "puppet:///modules/apache/vhost_varieties/${::operatingsystem}/${thedomain}/${filename}",
                    "puppet:///modules/apache/vhost_varieties/${thedomain}/${filename}",
        ],
        require => Apache::Vhost::Webdir[$thedomain],
        owner   => $owner,
        group   => $group,
        mode    => $mode;
    }
}