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 |
2100 |
class www inherits base { |
25 |
|
|
include apache::mod_php |
26 |
|
|
include apache::mod_geoip |
27 |
|
|
$vhostdir = "$webdatadir/www.$domain" |
28 |
|
|
$svn_location = "svn://svn.$domain/svn/web/www/trunk" |
29 |
|
|
|
30 |
|
|
subversion::snapshot { $vhostdir: |
31 |
|
|
source => $svn_location |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
apache::vhost_base { "www-test.$domain": |
35 |
|
|
content => template('websites/vhost_www.conf'), |
36 |
boklm |
2101 |
location => $vhostdir, |
37 |
boklm |
2102 |
options => ['FollowSymLinks'], |
38 |
boklm |
2100 |
} |
39 |
|
|
|
40 |
|
|
package { ['php-mbstring', 'php-mcrypt', 'php-gettext']: |
41 |
|
|
ensure => "installed", |
42 |
|
|
} |
43 |
|
|
} |
44 |
|
|
|
45 |
boklm |
1583 |
class hugs inherits base { |
46 |
|
|
$vhostdir = "$webdatadir/hugs.$domain" |
47 |
|
|
$svn_location = "svn://svn.$domain/svn/web/hugs/public/" |
48 |
|
|
apache::vhost_base { "hugs.$domain": |
49 |
|
|
location => $vhostdir, |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
subversion::snapshot { "$vhostdir": |
53 |
|
|
source => $svn_location |
54 |
|
|
} |
55 |
boklm |
1643 |
|
56 |
|
|
package { php-exif: |
57 |
|
|
ensure => "installed", |
58 |
|
|
} |
59 |
boklm |
1583 |
} |
60 |
|
|
|
61 |
boklm |
1592 |
class releases inherits base { |
62 |
|
|
$vhostdir = "$webdatadir/releases.$domain" |
63 |
|
|
$svn_location = "svn://svn.$domain/svn/web/releases/" |
64 |
|
|
apache::vhost_base { "releases.$domain": |
65 |
|
|
location => $vhostdir, |
66 |
pterjan |
1599 |
options => [ "FollowSymLinks" ] |
67 |
boklm |
1592 |
} |
68 |
boklm |
1607 |
apache::vhost_base { "ssl_releases.$domain": |
69 |
|
|
vhost => "releases.$domain", |
70 |
|
|
use_ssl => true, |
71 |
|
|
location => $vhostdir, |
72 |
|
|
options => [ "FollowSymLinks" ] |
73 |
|
|
} |
74 |
boklm |
1592 |
|
75 |
|
|
subversion::snapshot { "$vhostdir": |
76 |
|
|
source => $svn_location |
77 |
|
|
} |
78 |
|
|
} |
79 |
|
|
|
80 |
boklm |
2094 |
class www_outage { |
81 |
|
|
apache::vhost_redirect { "www.$domain": |
82 |
|
|
url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#' |
83 |
|
|
} |
84 |
boklm |
2096 |
apache::vhost_redirect { "$domain": |
85 |
|
|
url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#' |
86 |
|
|
} |
87 |
boklm |
2094 |
} |
88 |
|
|
|
89 |
misc |
955 |
class svn { |
90 |
|
|
apache::vhost_redirect { "svn.$domain": |
91 |
|
|
url => "http://svnweb.$domain/", |
92 |
|
|
} |
93 |
|
|
} |
94 |
misc |
1104 |
|
95 |
|
|
class forum_proxy { |
96 |
|
|
|
97 |
|
|
$web_domain = "forums.$domain" |
98 |
|
|
host { "$web_domain": |
99 |
|
|
ip => '192.168.122.131', |
100 |
|
|
ensure => 'present', |
101 |
|
|
} |
102 |
|
|
|
103 |
|
|
apache::vhost_reverse_proxy { "$web_domain": |
104 |
|
|
url => "http://$web_domain/", |
105 |
|
|
} |
106 |
|
|
|
107 |
|
|
apache::vhost_reverse_proxy { "ssl_$web_domain": |
108 |
|
|
vhost => $web_domain, |
109 |
|
|
use_ssl => true, |
110 |
|
|
url => "http://$web_domain/", |
111 |
|
|
} |
112 |
|
|
} |
113 |
misc |
1825 |
|
114 |
|
|
class pkgcpan inherits base { |
115 |
|
|
$vhost = "pkgcpan.$domain" |
116 |
|
|
$vhostdir = "$webdatadir/$vhost" |
117 |
|
|
|
118 |
|
|
apache::vhost_base { "$vhost": |
119 |
|
|
location => $vhostdir, |
120 |
|
|
options => [ "Indexes" ] |
121 |
|
|
} |
122 |
|
|
|
123 |
|
|
file { $vhostdir: |
124 |
|
|
ensure => directory, |
125 |
|
|
} |
126 |
|
|
|
127 |
|
|
package { "perl-Module-Packaged-Generator": |
128 |
|
|
ensure => installed, |
129 |
|
|
} |
130 |
|
|
|
131 |
|
|
cron { "update cpanpkg": |
132 |
|
|
hour => 23, |
133 |
|
|
require => Package['perl-Module-Packaged-Generator'], |
134 |
|
|
command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia", |
135 |
|
|
} |
136 |
|
|
} |
137 |
misc |
656 |
} |