1 |
misc |
656 |
class websites { |
2 |
boklm |
1010 |
class base { |
3 |
|
|
# FIXME : |
4 |
|
|
# We should be able to define this path on each host. |
5 |
|
|
# Maybe using Facter ? |
6 |
|
|
$webdatadir = '/srv/web1-dd0/www' |
7 |
|
|
|
8 |
|
|
file { "$webdatadir": |
9 |
|
|
ensure => directory, |
10 |
|
|
mode => 755, |
11 |
|
|
} |
12 |
|
|
} |
13 |
|
|
|
14 |
misc |
656 |
# should expire on June 2011 |
15 |
|
|
class donate { |
16 |
|
|
apache::vhost_other_app { "donate.$domain": |
17 |
|
|
vhost_file => "websites/vhost_donate.conf", |
18 |
|
|
} |
19 |
|
|
} |
20 |
misc |
955 |
|
21 |
boklm |
1010 |
# vhost to host static files used by web sites |
22 |
|
|
class static inherits base { |
23 |
|
|
$vhostdir = "$webdatadir/static.$domain" |
24 |
|
|
$svn_location = "svn://svn.$domain/svn/web/www/trunk/g/" |
25 |
|
|
apache::vhost_other_app { "static.$domain": |
26 |
|
|
vhost_file => 'websites/vhost_static.conf', |
27 |
|
|
} |
28 |
|
|
|
29 |
boklm |
1015 |
file { $vhostdir: |
30 |
|
|
ensure => directory, |
31 |
|
|
mode => 655, |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
subversion::snapshot { "$vhostdir/g": |
35 |
boklm |
1010 |
source => $svn_location |
36 |
|
|
} |
37 |
|
|
} |
38 |
|
|
|
39 |
boklm |
1583 |
class hugs inherits base { |
40 |
|
|
$vhostdir = "$webdatadir/hugs.$domain" |
41 |
|
|
$svn_location = "svn://svn.$domain/svn/web/hugs/public/" |
42 |
|
|
apache::vhost_base { "hugs.$domain": |
43 |
|
|
location => $vhostdir, |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
subversion::snapshot { "$vhostdir": |
47 |
|
|
source => $svn_location |
48 |
|
|
} |
49 |
|
|
} |
50 |
|
|
|
51 |
misc |
955 |
class svn { |
52 |
|
|
apache::vhost_redirect { "svn.$domain": |
53 |
|
|
url => "http://svnweb.$domain/", |
54 |
|
|
} |
55 |
|
|
} |
56 |
misc |
1104 |
|
57 |
|
|
class forum_proxy { |
58 |
|
|
|
59 |
|
|
$web_domain = "forums.$domain" |
60 |
|
|
host { "$web_domain": |
61 |
|
|
ip => '192.168.122.131', |
62 |
|
|
ensure => 'present', |
63 |
|
|
} |
64 |
|
|
|
65 |
|
|
apache::vhost_reverse_proxy { "$web_domain": |
66 |
|
|
url => "http://$web_domain/", |
67 |
|
|
} |
68 |
|
|
|
69 |
|
|
apache::vhost_reverse_proxy { "ssl_$web_domain": |
70 |
|
|
vhost => $web_domain, |
71 |
|
|
use_ssl => true, |
72 |
|
|
url => "http://$web_domain/", |
73 |
|
|
} |
74 |
|
|
} |
75 |
misc |
656 |
} |