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

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

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

revision 2394 by misc, Fri Feb 10 14:20:15 2012 UTC revision 2467 by boklm, Thu Feb 23 11:28:14 2012 UTC
# Line 2  class websites::pkgcpan { Line 2  class websites::pkgcpan {
2      include websites::base      include websites::base
3      $vhost = "pkgcpan.$::domain"      $vhost = "pkgcpan.$::domain"
4      $vhostdir = "$websites::base::webdatadir/$vhost"      $vhostdir = "$websites::base::webdatadir/$vhost"
5        $pkgcpan_login = 'pkgcpan'
6        $pkgcpan_homedir = "/var/lib/$pkgcpan_login"
7    
8        user { $pkgcpan_login:
9            managehome => true,
10            home => $pkgcpan_homedir,
11        }
12    
13      apache::vhost_base { $vhost:      apache::vhost_base { $vhost:
14          location => $vhostdir,          location => $vhostdir,
# Line 10  class websites::pkgcpan { Line 17  class websites::pkgcpan {
17    
18      file { $vhostdir:      file { $vhostdir:
19          ensure => directory,          ensure => directory,
20            owner => $pkgcpan_login,
21            group => $pkgcpan_login,
22      }      }
23    
24      package { 'perl-Module-Packaged-Generator': }      package { 'perl-Module-Packaged-Generator': }
25    
     # FIXME do not run as root ( apache or nobody should enough )  
26      cron { 'update cpanpkg':      cron { 'update cpanpkg':
27          hour    => 23,          hour    => 23,
28          require => Package['perl-Module-Packaged-Generator'],          require => Package['perl-Module-Packaged-Generator'],
29          command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",          command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
30            user => $pkgcpan_login,
31            require => User[$pkgcpan_login],
32      }      }
33  }  }

Legend:
Removed from v.2394  
changed lines
  Added in v.2467

  ViewVC Help
Powered by ViewVC 1.1.30