1 |
class mga-mirrors { |
2 |
|
3 |
$vhost = "mirrors.$domain" |
4 |
|
5 |
package { 'mga-mirrors': |
6 |
ensure => installed |
7 |
} |
8 |
|
9 |
apache::vhost_catalyst_app { $vhost: |
10 |
script => "/usr/bin/mga_mirrors_fastcgi.pl", |
11 |
require => Package['mga-mirrors'] |
12 |
} |
13 |
|
14 |
$pgsql_password = extlookup("mga_mirror_pgsql",'x') |
15 |
|
16 |
@@postgresql::user { 'mirrors': |
17 |
password => $pgsql_password, |
18 |
} |
19 |
|
20 |
@@postgresql::database { 'mirrors': |
21 |
description => "Mirrors database", |
22 |
user => "mirrors", |
23 |
require => Postgresql::User['mirrors'] |
24 |
} |
25 |
|
26 |
file { "mga-mirrors.ini": |
27 |
path => "/etc/mga-mirrors.ini", |
28 |
ensure => "present", |
29 |
owner => root, |
30 |
group => apache, |
31 |
mode => 640, |
32 |
content => template("mga-mirrors/mga-mirrors.ini"), |
33 |
require => Package['mga-mirrors'] |
34 |
} |
35 |
} |