diff options
author | Nicolas Vigier <boklm@mageia.org> | 2012-04-05 14:00:10 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2012-04-05 14:00:10 +0000 |
commit | 09fef5d5f2461f546627e9cdbf288516a83f6e53 (patch) | |
tree | 42e893c47d4c5de103efb0d4b11d6e2673c62ca7 /deployment/websites/manifests/pkgcpan.pp | |
parent | 7682bcce935de0831a17cfe1c9bdf07ce47c0bab (diff) | |
download | puppet-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.pp | 17 |
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, + } } |