1 |
class mga-mirrors { |
2 |
|
3 |
$vhost = "mirrors.$::domain" |
4 |
|
5 |
package { 'mga-mirrors': } |
6 |
|
7 |
apache::vhost::catalyst_app { $vhost: |
8 |
script => '/usr/bin/mga_mirrors_fastcgi.pl', |
9 |
require => Package['mga-mirrors'], |
10 |
aliases => { |
11 |
'/status' => '/var/www/mirrors/status.html', |
12 |
} |
13 |
} |
14 |
|
15 |
apache::vhost::base { "ssl_$vhost": |
16 |
vhost => $vhost, |
17 |
use_ssl => true, |
18 |
aliases => { |
19 |
'/status' => '/var/www/mirrors/status.html', |
20 |
'/' => '/usr/bin/mga_mirrors_fastcgi.pl/', |
21 |
}, |
22 |
} |
23 |
|
24 |
$pgsql_password = extlookup('mga_mirror_pgsql','x') |
25 |
|
26 |
postgresql::remote_db_and_user { 'mirrors': |
27 |
password => $pgsql_password, |
28 |
description => 'Mirrors database', |
29 |
} |
30 |
|
31 |
file { '/etc/mga-mirrors.ini': |
32 |
group => 'apache', |
33 |
mode => '0640', |
34 |
content => template('mga-mirrors/mga-mirrors.ini'), |
35 |
require => Package['mga-mirrors'] |
36 |
} |
37 |
|
38 |
file { '/etc/cron.d/mga_mirrors': |
39 |
content => template('mga-mirrors/cron-mga_mirrors'), |
40 |
require => Package['mga-mirrors'] |
41 |
} |
42 |
} |