1 |
class mga-mirrors { |
class mga-mirrors { |
2 |
|
|
3 |
$vhost = "mirrors.$domain" |
$vhost = "mirrors.$::domain" |
4 |
|
|
5 |
package { 'mga-mirrors': } |
package { 'mga-mirrors': } |
6 |
|
|
7 |
apache::vhost_catalyst_app { $vhost: |
apache::vhost_catalyst_app { $vhost: |
8 |
script => "/usr/bin/mga_mirrors_fastcgi.pl", |
script => '/usr/bin/mga_mirrors_fastcgi.pl', |
9 |
require => Package['mga-mirrors'], |
require => Package['mga-mirrors'], |
10 |
} |
} |
11 |
|
|
12 |
$pgsql_password = extlookup("mga_mirror_pgsql",'x') |
$pgsql_password = extlookup('mga_mirror_pgsql','x') |
13 |
|
|
14 |
postgresql::remote_db_and_user { 'mirrors': |
postgresql::remote_db_and_user { 'mirrors': |
15 |
password => $pgsql_password, |
password => $pgsql_password, |
16 |
description => "Mirrors database", |
description => 'Mirrors database', |
17 |
} |
} |
18 |
|
|
19 |
file { "/etc/mga-mirrors.ini": |
file { '/etc/mga-mirrors.ini': |
20 |
group => apache, |
group => 'apache', |
21 |
mode => 640, |
mode => '0640', |
22 |
content => template("mga-mirrors/mga-mirrors.ini"), |
content => template('mga-mirrors/mga-mirrors.ini'), |
23 |
require => Package['mga-mirrors'] |
require => Package['mga-mirrors'] |
24 |
} |
} |
25 |
|
|
26 |
file { "/etc/cron.d/mga_mirrors": |
file { '/etc/cron.d/mga_mirrors': |
27 |
content => template("mga-mirrors/cron-mga_mirrors"), |
content => template('mga-mirrors/cron-mga_mirrors'), |
28 |
require => Package['mga-mirrors'] |
require => Package['mga-mirrors'] |
29 |
} |
} |
30 |
} |
} |