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 |
$pgsql_password = extlookup('mga_mirror_pgsql','x') |
13 |
|
14 |
postgresql::remote_db_and_user { 'mirrors': |
15 |
password => $pgsql_password, |
16 |
description => 'Mirrors database', |
17 |
} |
18 |
|
19 |
file { '/etc/mga-mirrors.ini': |
20 |
group => 'apache', |
21 |
mode => '0640', |
22 |
content => template('mga-mirrors/mga-mirrors.ini'), |
23 |
require => Package['mga-mirrors'] |
24 |
} |
25 |
|
26 |
file { '/etc/cron.d/mga_mirrors': |
27 |
content => template('mga-mirrors/cron-mga_mirrors'), |
28 |
require => Package['mga-mirrors'] |
29 |
} |
30 |
} |