]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/apache2/manifests/init.pp
Remove sites-available/common-ssl.inc
[dsa-puppet.git] / modules / apache2 / manifests / init.pp
1 class apache2 {
2         package { 'apache2':
3                 ensure => installed,
4         }
5
6         service { 'apache2':
7                 ensure  => running,
8                 require => Package['apache2'],
9         }
10
11         apache2::module { 'info': }
12         apache2::module { 'status': }
13
14         package { 'libapache2-mod-macro':
15                 ensure => installed
16         }
17
18         apache2::module { 'macro':
19                 require => Package['libapache2-mod-macro']
20         }
21
22         apache2::site { '00-default':
23                 site     => 'default-debian.org',
24                 content  => template('apache2/default-debian.org.erb'),
25         }
26
27         apache2::site { '000-default':
28                 ensure => absent,
29         }
30
31         apache2::config { 'ressource-limits':
32                 ensure => absent,
33         }
34
35         apache2::config { 'resource-limits':
36                 content => template('apache2/resource-limits.erb'),
37         }
38
39         apache2::config { 'security':
40                 source => 'puppet:///modules/apache2/security',
41         }
42
43         apache2::config { 'logformat-privacy':
44                 source => 'puppet:///modules/apache2/logformat-privacy',
45         }
46
47         apache2::config { 'local-serverinfo':
48                 source => 'puppet:///modules/apache2/local-serverinfo',
49         }
50
51         apache2::config { 'server-status':
52                 source => 'puppet:///modules/apache2/server-status',
53         }
54
55         file { '/etc/apache2/sites-available/common-ssl.inc':
56                 ensure => absent,
57         }
58
59         file { '/etc/logrotate.d/apache2':
60                 source => 'puppet:///modules/apache2/apache2.logrotate',
61         }
62
63         file { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs' ]:
64                 ensure  => directory,
65                 mode    => '0755',
66         }
67
68         file { '/srv/www/default.debian.org/htdocs/index.html':
69                 content => template('apache2/default-index.html'),
70         }
71
72         munin::check { 'apache_accesses': }
73         munin::check { 'apache_processes': }
74         munin::check { 'apache_volume': }
75         munin::check { 'apache_servers': }
76         munin::check { 'ps_apache2':
77                 script => 'ps_',
78         }
79
80         if $::hostname in [beach,buxtehude,picconi,pkgmirror-1and1] {
81                 include apache2::dynamic
82         } else {
83                 @ferm::rule { 'dsa-http':
84                         prio        => '23',
85                         description => 'Allow web access',
86                         rule        => '&SERVICE(tcp, (http https))'
87                 }
88         }
89
90         @ferm::rule { 'dsa-http-v6':
91                 domain          => '(ip6)',
92                 prio            => '23',
93                 description     => 'Allow web access',
94                 rule            => '&SERVICE(tcp, (http https))'
95         }
96 }