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

Contents of /puppet/deployment/websites/manifests/pkgcpan.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2719 - (show annotations) (download)
Thu Apr 5 14:00:10 2012 UTC (9 years, 3 months ago) by boklm
File size: 1245 byte(s)
generate pkgcpan stats
1 class websites::pkgcpan {
2 include websites::base
3 $vhost = "pkgcpan.$::domain"
4 $vhostdir = "$websites::base::webdatadir/$vhost"
5 $statsdir = "${vhostdir}/stats"
6 $login = 'pkgcpan'
7 $homedir = "/var/lib/$login"
8
9 user { $login:
10 managehome => true,
11 home => $homedir,
12 }
13
14 apache::vhost::base { $vhost:
15 location => $vhostdir,
16 options => [ 'Indexes' ],
17 }
18
19 file { $vhostdir:
20 ensure => directory,
21 owner => $login,
22 group => $login,
23 }
24
25 package { ['perl-Module-Packaged-Generator', 'magpie']: }
26
27 cron { 'update cpanpkg':
28 hour => 23,
29 require => Package['perl-Module-Packaged-Generator'],
30 command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
31 user => $login,
32 }
33
34 file { "$vhostdir/cpan_Mageia.db":
35 owner => $login,
36 group => $login,
37 }
38
39 file { $statsdir:
40 ensure => directory,
41 owner => $login,
42 group => $login,
43 }
44
45 # http://www.mageia.org/pipermail/mageia-sysadm/2012-March/004337.html
46 cron { 'update pkgcpan stats':
47 hour => 24,
48 require => [ Package['magpie'], File[$statsdir] ],
49 command => "magpie webstatic -d $statsdir",
50 user => $login,
51 }
52 }

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.28