/[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 2096 - (show annotations) (download)
Mon Dec 19 15:28:03 2011 UTC (12 years, 4 months ago) by boklm
File size: 2830 byte(s)
also redirect mageia.org
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 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
35 package { php-exif:
36 ensure => "installed",
37 }
38 }
39
40 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 options => [ "FollowSymLinks" ]
46 }
47 apache::vhost_base { "ssl_releases.$domain":
48 vhost => "releases.$domain",
49 use_ssl => true,
50 location => $vhostdir,
51 options => [ "FollowSymLinks" ]
52 }
53
54 subversion::snapshot { "$vhostdir":
55 source => $svn_location
56 }
57 }
58
59 class www_outage {
60 apache::vhost_redirect { "www.$domain":
61 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
62 }
63 apache::vhost_redirect { "$domain":
64 url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
65 }
66 }
67
68 class svn {
69 apache::vhost_redirect { "svn.$domain":
70 url => "http://svnweb.$domain/",
71 }
72 }
73
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
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 }

  ViewVC Help
Powered by ViewVC 1.1.30