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 |
} |
11 |
|
12 |
apache::vhost::catalyst_app { "ssl_$vhost": |
13 |
vhost => $vhost, |
14 |
use_ssl => true, |
15 |
script => '/usr/bin/mga_mirrors_fastcgi.pl', |
16 |
require => Package['mga-mirrors'], |
17 |
} |
18 |
|
19 |
$pgsql_password = extlookup('mga_mirror_pgsql','x') |
20 |
|
21 |
postgresql::remote_db_and_user { 'mirrors': |
22 |
password => $pgsql_password, |
23 |
description => 'Mirrors database', |
24 |
} |
25 |
|
26 |
file { '/etc/mga-mirrors.ini': |
27 |
group => 'apache', |
28 |
mode => '0640', |
29 |
content => template('mga-mirrors/mga-mirrors.ini'), |
30 |
require => Package['mga-mirrors'] |
31 |
} |
32 |
|
33 |
file { '/etc/cron.d/mga_mirrors': |
34 |
content => template('mga-mirrors/cron-mga_mirrors'), |
35 |
require => Package['mga-mirrors'] |
36 |
} |
37 |
} |