1 |
class mga-mirrors { |
2 |
|
3 |
$vhost = "mirrors.$domain" |
4 |
|
5 |
include apache::mod_fastcgi |
6 |
|
7 |
package { 'mga-mirrors': |
8 |
ensure => installed |
9 |
} |
10 |
|
11 |
# add a apache vhost |
12 |
file { "$vhost.conf": |
13 |
path => "/etc/httpd/conf/vhosts.d/$vhost.conf", |
14 |
ensure => "present", |
15 |
owner => root, |
16 |
group => root, |
17 |
mode => 644, |
18 |
notify => Service['apache'], |
19 |
content => template("mga-mirrors/mirrors_vhost.conf") |
20 |
} |
21 |
|
22 |
$password = extlookup("mga_mirror_password") |
23 |
|
24 |
file { "mga-mirrors.ini": |
25 |
path => "/etc/mga-mirrors.ini", |
26 |
ensure => "present", |
27 |
owner => apache, |
28 |
group => apache, |
29 |
mode => 600, |
30 |
content => template("mga-mirrors/mga-mirrors.ini") |
31 |
} |
32 |
} |