summaryrefslogtreecommitdiff
path: root/manifests/debian.pp
blob: e07920f02ebe542c128c61ce2369bc5b309afd59 (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
28
29
30
31
32
33
34
35
36
37
38
39
### debian
class apache::debian inherits apache::package {
    $config_dir = '/etc/apache2'

    Package[apache] {
	    name => 'apache2',
    }
    File[vhosts_dir] {
        path => "${config_dir}/sites-enabled",
    }
    File[modules_dir] {
        path => "${config_dir}/mods-enabled",
    }
    File[htpasswd_dir] {
        path => "/var/www/htpasswds",
	group => 'www-data',
    }
    File[default_apache_index] {
        path => '/var/www/index.html',
    }
    file { 'apache_main_config':
        path => "${config_dir}/apache2.conf",
        source => [ "puppet://$server/modules/site-apache/config/Debian.${lsbdistcodename}/${fqdn}/apache2.conf",
                    "puppet://$server/modules/site-apache/config/Debian/{$fqdn}/apache2.conf",
                    "puppet://$server/modules/site-apache/config/Debian.${lsbdistcodename}/apache2.conf",
                    "puppet://$server/modules/site-apache/config/Debian/apache2.conf",
                    "puppet://$server/modules/apache/config/Debian/apache2.conf" ],
        require => Package['apache'],
        notify => Service['apache'],
        owner => root, group => 0, mode => 0644;
    }
    apache::config::global{ 'charset': }
    apache::config::global{ 'security': }
    file { 'default_debian_apache_vhost':
        path => '/etc/apache2/sites-enabled/000-default',
        ensure => absent,
    }
}