/[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 2094 - (show annotations) (download)
Mon Dec 19 15:10:21 2011 UTC (12 years, 4 months ago) by boklm
File size: 2723 byte(s)
add temporary redirect of www.mageia.org to blog post
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 }
64
65 class svn {
66 apache::vhost_redirect { "svn.$domain":
67 url => "http://svnweb.$domain/",
68 }
69 }
70
71 class forum_proxy {
72
73 $web_domain = "forums.$domain"
74 host { "$web_domain":
75 ip => '192.168.122.131',
76 ensure => 'present',
77 }
78
79 apache::vhost_reverse_proxy { "$web_domain":
80 url => "http://$web_domain/",
81 }
82
83 apache::vhost_reverse_proxy { "ssl_$web_domain":
84 vhost => $web_domain,
85 use_ssl => true,
86 url => "http://$web_domain/",
87 }
88 }
89
90 class pkgcpan inherits base {
91 $vhost = "pkgcpan.$domain"
92 $vhostdir = "$webdatadir/$vhost"
93
94 apache::vhost_base { "$vhost":
95 location => $vhostdir,
96 options => [ "Indexes" ]
97 }
98
99 file { $vhostdir:
100 ensure => directory,
101 }
102
103 package { "perl-Module-Packaged-Generator":
104 ensure => installed,
105 }
106
107 cron { "update cpanpkg":
108 hour => 23,
109 require => Package['perl-Module-Packaged-Generator'],
110 command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
111 }
112 }
113 }

  ViewVC Help
Powered by ViewVC 1.1.30