/[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 2101 - (show annotations) (download)
Tue Dec 20 13:58:20 2011 UTC (12 years, 4 months ago) by boklm
File size: 3298 byte(s)
add location
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 }
38
39 package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
40 ensure => "installed",
41 }
42 }
43
44 class hugs inherits base {
45 $vhostdir = "$webdatadir/hugs.$domain"
46 $svn_location = "svn://svn.$domain/svn/web/hugs/public/"
47 apache::vhost_base { "hugs.$domain":
48 location => $vhostdir,
49 }
50
51 subversion::snapshot { "$vhostdir":
52 source => $svn_location
53 }
54
55 package { php-exif:
56 ensure => "installed",
57 }
58 }
59
60 class releases inherits base {
61 $vhostdir = "$webdatadir/releases.$domain"
62 $svn_location = "svn://svn.$domain/svn/web/releases/"
63 apache::vhost_base { "releases.$domain":
64 location => $vhostdir,
65 options => [ "FollowSymLinks" ]
66 }
67 apache::vhost_base { "ssl_releases.$domain":
68 vhost => "releases.$domain",
69 use_ssl => true,
70 location => $vhostdir,
71 options => [ "FollowSymLinks" ]
72 }
73
74 subversion::snapshot { "$vhostdir":
75 source => $svn_location
76 }
77 }
78
79 class www_outage {
80 apache::vhost_redirect { "www.$domain":
81 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
82 }
83 apache::vhost_redirect { "$domain":
84 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
85 }
86 }
87
88 class svn {
89 apache::vhost_redirect { "svn.$domain":
90 url => "http://svnweb.$domain/",
91 }
92 }
93
94 class forum_proxy {
95
96 $web_domain = "forums.$domain"
97 host { "$web_domain":
98 ip => '192.168.122.131',
99 ensure => 'present',
100 }
101
102 apache::vhost_reverse_proxy { "$web_domain":
103 url => "http://$web_domain/",
104 }
105
106 apache::vhost_reverse_proxy { "ssl_$web_domain":
107 vhost => $web_domain,
108 use_ssl => true,
109 url => "http://$web_domain/",
110 }
111 }
112
113 class pkgcpan inherits base {
114 $vhost = "pkgcpan.$domain"
115 $vhostdir = "$webdatadir/$vhost"
116
117 apache::vhost_base { "$vhost":
118 location => $vhostdir,
119 options => [ "Indexes" ]
120 }
121
122 file { $vhostdir:
123 ensure => directory,
124 }
125
126 package { "perl-Module-Packaged-Generator":
127 ensure => installed,
128 }
129
130 cron { "update cpanpkg":
131 hour => 23,
132 require => Package['perl-Module-Packaged-Generator'],
133 command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
134 }
135 }
136 }

  ViewVC Help
Powered by ViewVC 1.1.30