aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/manifests/init.pp
blob: dbc09c0e125d7c233dc68bc0c24cc73ac223c91a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class websites {
    class base {
       # FIXME :
       # We should be able to define this path on each host.
       # Maybe using Facter ?
       $webdatadir = '/srv/web1-dd0/www'

       file { "$webdatadir":
          ensure => directory,
	  mode => 755,
       }
    }

    # should expire on June 2011
    class donate {
        apache::vhost_other_app { "donate.$domain":
            vhost_file => "websites/vhost_donate.conf",
        }
    }

    # 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',
	}

	subversion::snapshot { $vhostdir:
	    source => $svn_location
	}
    }

    class svn {
        apache::vhost_redirect { "svn.$domain":
            url => "http://svnweb.$domain/",
        }
    }
}