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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2101 - (hide 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 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 2100 }
38    
39     package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
40     ensure => "installed",
41     }
42     }
43    
44 boklm 1583 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 boklm 1643
55     package { php-exif:
56     ensure => "installed",
57     }
58 boklm 1583 }
59    
60 boklm 1592 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 pterjan 1599 options => [ "FollowSymLinks" ]
66 boklm 1592 }
67 boklm 1607 apache::vhost_base { "ssl_releases.$domain":
68     vhost => "releases.$domain",
69     use_ssl => true,
70     location => $vhostdir,
71     options => [ "FollowSymLinks" ]
72     }
73 boklm 1592
74     subversion::snapshot { "$vhostdir":
75     source => $svn_location
76     }
77     }
78    
79 boklm 2094 class www_outage {
80     apache::vhost_redirect { "www.$domain":
81     url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
82     }
83 boklm 2096 apache::vhost_redirect { "$domain":
84     url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
85     }
86 boklm 2094 }
87    
88 misc 955 class svn {
89     apache::vhost_redirect { "svn.$domain":
90     url => "http://svnweb.$domain/",
91     }
92     }
93 misc 1104
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 misc 1825
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 misc 656 }

  ViewVC Help
Powered by ViewVC 1.1.30