aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/manifests/pkgcpan.pp
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-04-05 14:00:10 +0000
committerNicolas Vigier <boklm@mageia.org>2012-04-05 14:00:10 +0000
commit09fef5d5f2461f546627e9cdbf288516a83f6e53 (patch)
tree42e893c47d4c5de103efb0d4b11d6e2673c62ca7 /deployment/websites/manifests/pkgcpan.pp
parent7682bcce935de0831a17cfe1c9bdf07ce47c0bab (diff)
downloadpuppet-09fef5d5f2461f546627e9cdbf288516a83f6e53.tar
puppet-09fef5d5f2461f546627e9cdbf288516a83f6e53.tar.gz
puppet-09fef5d5f2461f546627e9cdbf288516a83f6e53.tar.bz2
puppet-09fef5d5f2461f546627e9cdbf288516a83f6e53.tar.xz
puppet-09fef5d5f2461f546627e9cdbf288516a83f6e53.zip
generate pkgcpan stats
Diffstat (limited to 'deployment/websites/manifests/pkgcpan.pp')
-rw-r--r--deployment/websites/manifests/pkgcpan.pp17
1 files changed, 16 insertions, 1 deletions
diff --git a/deployment/websites/manifests/pkgcpan.pp b/deployment/websites/manifests/pkgcpan.pp
index c259d06c..59233c08 100644
--- a/deployment/websites/manifests/pkgcpan.pp
+++ b/deployment/websites/manifests/pkgcpan.pp
@@ -2,6 +2,7 @@ class websites::pkgcpan {
include websites::base
$vhost = "pkgcpan.$::domain"
$vhostdir = "$websites::base::webdatadir/$vhost"
+ $statsdir = "${vhostdir}/stats"
$login = 'pkgcpan'
$homedir = "/var/lib/$login"
@@ -21,7 +22,7 @@ class websites::pkgcpan {
group => $login,
}
- package { 'perl-Module-Packaged-Generator': }
+ package { ['perl-Module-Packaged-Generator', 'magpie']: }
cron { 'update cpanpkg':
hour => 23,
@@ -34,4 +35,18 @@ class websites::pkgcpan {
owner => $login,
group => $login,
}
+
+ file { $statsdir:
+ ensure => directory,
+ owner => $login,
+ group => $login,
+ }
+
+ # http://www.mageia.org/pipermail/mageia-sysadm/2012-March/004337.html
+ cron { 'update pkgcpan stats':
+ hour => 24,
+ require => [ Package['magpie'], File[$statsdir] ],
+ command => "magpie webstatic -d $statsdir",
+ user => $login,
+ }
}