summaryrefslogtreecommitdiff
path: root/manifests/base.pp
blob: 984dc3287a8a6d144328212ce627e427164491b5 (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
40
41
42
43
44
45
46
47
48
49
class apache::base {
    file{'vhosts_dir':
        path => '/etc/apache2/vhosts.d',
        ensure => directory,
        owner => root, group => 0, mode => 0755;
    }
    file{'config_dir':
        path => '/etc/apache2/conf.d',
        ensure => directory,
        owner => root, group => 0, mode => 0755;
    }
    file{'include_dir':
        path => '/etc/apache2/include.d',
        ensure => directory,
        owner => root, group => 0, mode => 0755;
    }
    file{'modules_dir':
        path => '/etc/apache2/modules.d',
        ensure => directory,
        owner => root, group => 0, mode => 0755;
    }
    file{'htpasswd_dir':
        path => '/var/www/htpasswds',
        ensure => directory,
        owner => root, group => apache, mode => 0640;
    }
    file{'web_dir':
        path => '/var/www',
        ensure => directory,
        owner => root, group => 0, mode => 0755;
    }
    service { apache:
        name => 'apache2',
        enable => true,
        ensure => running,
    }
    file { 'default_apache_index':
        path => '/var/www/localhost/htdocs/index.html',
        ensure => file,
        content => template('apache/default/default_index.erb'),
        owner => root, group => 0, mode => 0644;
    }

    apache::config::include{ 'defaults.inc': }
    apache::config::global{ 'git.conf': }
    if !$apache_no_default_site {
      apache::vhost::file { '0-default': }
    }
}