1 |
misc |
656 |
class websites { |
2 |
boklm |
1010 |
class base { |
3 |
boklm |
1608 |
$webdatadir = '/var/www/vhosts' |
4 |
boklm |
1010 |
} |
5 |
|
|
|
6 |
|
|
# vhost to host static files used by web sites |
7 |
|
|
class static inherits base { |
8 |
|
|
$vhostdir = "$webdatadir/static.$domain" |
9 |
|
|
$svn_location = "svn://svn.$domain/svn/web/www/trunk/g/" |
10 |
|
|
apache::vhost_other_app { "static.$domain": |
11 |
|
|
vhost_file => 'websites/vhost_static.conf', |
12 |
|
|
} |
13 |
|
|
|
14 |
boklm |
1015 |
file { $vhostdir: |
15 |
|
|
ensure => directory, |
16 |
|
|
mode => 655, |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
subversion::snapshot { "$vhostdir/g": |
20 |
boklm |
1010 |
source => $svn_location |
21 |
|
|
} |
22 |
|
|
} |
23 |
|
|
|
24 |
boklm |
1583 |
class hugs inherits base { |
25 |
|
|
$vhostdir = "$webdatadir/hugs.$domain" |
26 |
|
|
$svn_location = "svn://svn.$domain/svn/web/hugs/public/" |
27 |
|
|
apache::vhost_base { "hugs.$domain": |
28 |
|
|
location => $vhostdir, |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
subversion::snapshot { "$vhostdir": |
32 |
|
|
source => $svn_location |
33 |
|
|
} |
34 |
boklm |
1643 |
|
35 |
|
|
package { php-exif: |
36 |
|
|
ensure => "installed", |
37 |
|
|
} |
38 |
boklm |
1583 |
} |
39 |
|
|
|
40 |
boklm |
1592 |
class releases inherits base { |
41 |
|
|
$vhostdir = "$webdatadir/releases.$domain" |
42 |
|
|
$svn_location = "svn://svn.$domain/svn/web/releases/" |
43 |
|
|
apache::vhost_base { "releases.$domain": |
44 |
|
|
location => $vhostdir, |
45 |
pterjan |
1599 |
options => [ "FollowSymLinks" ] |
46 |
boklm |
1592 |
} |
47 |
boklm |
1607 |
apache::vhost_base { "ssl_releases.$domain": |
48 |
|
|
vhost => "releases.$domain", |
49 |
|
|
use_ssl => true, |
50 |
|
|
location => $vhostdir, |
51 |
|
|
options => [ "FollowSymLinks" ] |
52 |
|
|
} |
53 |
boklm |
1592 |
|
54 |
|
|
subversion::snapshot { "$vhostdir": |
55 |
|
|
source => $svn_location |
56 |
|
|
} |
57 |
|
|
} |
58 |
|
|
|
59 |
boklm |
2094 |
class www_outage { |
60 |
|
|
apache::vhost_redirect { "www.$domain": |
61 |
|
|
url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#' |
62 |
|
|
} |
63 |
boklm |
2096 |
apache::vhost_redirect { "$domain": |
64 |
|
|
url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#' |
65 |
|
|
} |
66 |
boklm |
2094 |
} |
67 |
|
|
|
68 |
misc |
955 |
class svn { |
69 |
|
|
apache::vhost_redirect { "svn.$domain": |
70 |
|
|
url => "http://svnweb.$domain/", |
71 |
|
|
} |
72 |
|
|
} |
73 |
misc |
1104 |
|
74 |
|
|
class forum_proxy { |
75 |
|
|
|
76 |
|
|
$web_domain = "forums.$domain" |
77 |
|
|
host { "$web_domain": |
78 |
|
|
ip => '192.168.122.131', |
79 |
|
|
ensure => 'present', |
80 |
|
|
} |
81 |
|
|
|
82 |
|
|
apache::vhost_reverse_proxy { "$web_domain": |
83 |
|
|
url => "http://$web_domain/", |
84 |
|
|
} |
85 |
|
|
|
86 |
|
|
apache::vhost_reverse_proxy { "ssl_$web_domain": |
87 |
|
|
vhost => $web_domain, |
88 |
|
|
use_ssl => true, |
89 |
|
|
url => "http://$web_domain/", |
90 |
|
|
} |
91 |
|
|
} |
92 |
misc |
1825 |
|
93 |
|
|
class pkgcpan inherits base { |
94 |
|
|
$vhost = "pkgcpan.$domain" |
95 |
|
|
$vhostdir = "$webdatadir/$vhost" |
96 |
|
|
|
97 |
|
|
apache::vhost_base { "$vhost": |
98 |
|
|
location => $vhostdir, |
99 |
|
|
options => [ "Indexes" ] |
100 |
|
|
} |
101 |
|
|
|
102 |
|
|
file { $vhostdir: |
103 |
|
|
ensure => directory, |
104 |
|
|
} |
105 |
|
|
|
106 |
|
|
package { "perl-Module-Packaged-Generator": |
107 |
|
|
ensure => installed, |
108 |
|
|
} |
109 |
|
|
|
110 |
|
|
cron { "update cpanpkg": |
111 |
|
|
hour => 23, |
112 |
|
|
require => Package['perl-Module-Packaged-Generator'], |
113 |
|
|
command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia", |
114 |
|
|
} |
115 |
|
|
} |
116 |
misc |
656 |
} |