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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2202 by boklm, Tue Dec 20 15:16:14 2011 UTC revision 2203 by misc, Sun Jan 8 20:25:06 2012 UTC
# Line 2  class websites { Line 2  class websites {
2      class base {      class base {
3         $webdatadir = '/var/www/vhosts'         $webdatadir = '/var/www/vhosts'
4      }      }
   
     # vhost to host static files used by web sites  
     class static inherits base {  
         $vhostdir = "$webdatadir/static.$domain"  
         $svn_location = "svn://svn.$domain/svn/web/www/trunk/g/"  
         apache::vhost_other_app { "static.$domain":  
             vhost_file => 'websites/vhost_static.conf',  
         }  
   
         file { $vhostdir:  
             ensure => directory,  
             mode => 655,  
         }  
   
         subversion::snapshot { "$vhostdir/g":  
             source => $svn_location  
         }  
     }  
   
     class www inherits base {  
         include apache::mod_php  
         include apache::mod_geoip  
         $vhost = "www.$domain"  
         $vhostdir = "$webdatadir/www.$domain"  
         $svn_location = "svn://svn.$domain/svn/web/www/trunk"  
   
         subversion::snapshot { $vhostdir:  
             source => $svn_location  
         }  
   
         file { "$vhostdir/var/tmp/cache":  
             ensure => directory,  
             owner => root,  
             group => $apache::base::apache_group,  
             mode => 0660,  
         }  
   
         apache::vhost_base { "$vhost":  
             content => template('websites/vhost_www.conf'),  
             location => $vhostdir,  
             options => ['FollowSymLinks'],  
         }  
         apache::vhost_base { "ssl_$vhost":  
             use_ssl => true,  
             vhost => $vhost,  
             content => template('websites/vhost_www.conf'),  
             location => $vhostdir,  
             options => ['FollowSymLinks'],  
         }  
   
         apache::vhost_redirect { $domain:  
             url => 'http://www.mageia.org/',  
         }  
         apache::vhost_redirect { "ssl_$domain":  
             use_ssl => true,  
             vhost => $domain,  
             url => 'https://www.mageia.org/',  
         }  
   
         package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:  
             ensure => "installed",  
         }  
     }  
   
     class hugs inherits base {  
         $vhostdir = "$webdatadir/hugs.$domain"  
         $svn_location = "svn://svn.$domain/svn/web/hugs/public/"  
         apache::vhost_base { "hugs.$domain":  
             location => $vhostdir,  
         }  
   
         subversion::snapshot { "$vhostdir":  
             source => $svn_location  
         }  
   
         package { php-exif:  
             ensure => "installed",  
         }  
     }  
   
     class releases inherits base {  
         $vhostdir = "$webdatadir/releases.$domain"  
         $svn_location = "svn://svn.$domain/svn/web/releases/"  
         apache::vhost_base { "releases.$domain":  
             location => $vhostdir,  
             options => [ "FollowSymLinks" ]  
         }  
         apache::vhost_base { "ssl_releases.$domain":  
             vhost => "releases.$domain",  
             use_ssl => true,  
             location => $vhostdir,  
             options => [ "FollowSymLinks" ]  
         }  
   
         subversion::snapshot { "$vhostdir":  
             source => $svn_location  
         }  
     }  
   
     class svn {  
         apache::vhost_redirect { "svn.$domain":  
             url => "http://svnweb.$domain/",  
         }  
     }  
   
     class forum_proxy {  
   
         $web_domain = "forums.$domain"  
         host { "$web_domain":  
             ip => '192.168.122.131',  
             ensure => 'present',  
         }  
   
         apache::vhost_reverse_proxy { "$web_domain":  
             url => "http://$web_domain/",  
         }  
   
         apache::vhost_reverse_proxy { "ssl_$web_domain":  
             vhost => $web_domain,  
             use_ssl => true,  
             url => "http://$web_domain/",  
         }  
     }  
   
     class pkgcpan inherits base {  
         $vhost = "pkgcpan.$domain"  
         $vhostdir = "$webdatadir/$vhost"  
   
         apache::vhost_base { "$vhost":  
             location => $vhostdir,  
             options => [ "Indexes" ]  
         }                  
           
         file { $vhostdir:  
             ensure => directory,  
         }  
   
         package { "perl-Module-Packaged-Generator":  
             ensure => installed,          
         }  
           
         cron { "update cpanpkg":  
             hour => 23,  
             require => Package['perl-Module-Packaged-Generator'],  
             command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",  
         }  
     }  
5  }  }

Legend:
Removed from v.2202  
changed lines
  Added in v.2203

  ViewVC Help
Powered by ViewVC 1.1.30