2013-02-07 22:20:10 +01:00
|
|
|
class humbug::apache {
|
|
|
|
$apache_packages = [ "apache2", "libapache2-mod-wsgi", ]
|
|
|
|
package { $apache_packages: ensure => "installed" }
|
|
|
|
|
|
|
|
apache2mod { [ "headers", "proxy", "proxy_http", "rewrite", "auth_digest", "ssl" ]:
|
2013-02-08 18:46:43 +01:00
|
|
|
ensure => present,
|
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/users/":
|
2013-02-08 18:46:43 +01:00
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
ensure => directory,
|
|
|
|
owner => "www-data",
|
|
|
|
group => "www-data",
|
|
|
|
mode => 600,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/users/wiki":
|
|
|
|
require => File["/etc/apache2/users/"],
|
|
|
|
ensure => file,
|
|
|
|
owner => "www-data",
|
|
|
|
group => "www-data",
|
|
|
|
mode => 600,
|
2013-02-08 00:33:31 +01:00
|
|
|
source => "puppet:///modules/humbug/apache/users",
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/certs/":
|
2013-02-08 18:46:43 +01:00
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
ensure => directory,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/certs/humbug-self-signed.crt":
|
|
|
|
require => File["/etc/apache2/certs/"],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 640,
|
|
|
|
source => "/root/humbug/certs/humbug-self-signed.crt",
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/certs/humbug-self-signed.key":
|
|
|
|
require => File["/etc/apache2/certs/"],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 600,
|
|
|
|
source => "/root/humbug/certs/humbug-self-signed.key",
|
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/ports.conf":
|
|
|
|
require => Package[apache2],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 640,
|
2013-02-08 00:33:31 +01:00
|
|
|
source => "puppet:///modules/humbug/apache/ports.conf",
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { "/etc/apache2/sites-available/":
|
|
|
|
recurse => true,
|
|
|
|
require => Package[apache2],
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 640,
|
2013-02-08 00:33:31 +01:00
|
|
|
source => "puppet:///modules/humbug/apache/sites/",
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
apache2site { 'humbug-default':
|
|
|
|
require => [File['/etc/apache2/sites-available/'],
|
|
|
|
Apache2mod['headers'], Apache2mod['ssl'],
|
|
|
|
],
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
}
|