/[adm]/puppet/deployment/websites/manifests/init.pp
ViewVC logotype

Contents of /puppet/deployment/websites/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2102 - (show annotations) (download)
Tue Dec 20 14:06:41 2011 UTC (12 years, 4 months ago) by boklm
File size: 3334 byte(s)
add FollowSymLinks option
1 class websites {
2 class base {
3 $webdatadir = '/var/www/vhosts'
4 }
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 file { $vhostdir:
15 ensure => directory,
16 mode => 655,
17 }
18
19 subversion::snapshot { "$vhostdir/g":
20 source => $svn_location
21 }
22 }
23
24 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 location => $vhostdir,
37 options => ['FollowSymLinks'],
38 }
39
40 package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
41 ensure => "installed",
42 }
43 }
44
45 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
56 package { php-exif:
57 ensure => "installed",
58 }
59 }
60
61 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 options => [ "FollowSymLinks" ]
67 }
68 apache::vhost_base { "ssl_releases.$domain":
69 vhost => "releases.$domain",
70 use_ssl => true,
71 location => $vhostdir,
72 options => [ "FollowSymLinks" ]
73 }
74
75 subversion::snapshot { "$vhostdir":
76 source => $svn_location
77 }
78 }
79
80 class www_outage {
81 apache::vhost_redirect { "www.$domain":
82 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
83 }
84 apache::vhost_redirect { "$domain":
85 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
86 }
87 }
88
89 class svn {
90 apache::vhost_redirect { "svn.$domain":
91 url => "http://svnweb.$domain/",
92 }
93 }
94
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
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 }

  ViewVC Help
Powered by ViewVC 1.1.30