aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/manifests/pkgcpan.pp
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites/manifests/pkgcpan.pp')
-rw-r--r--deployment/websites/manifests/pkgcpan.pp24
1 files changed, 24 insertions, 0 deletions
diff --git a/deployment/websites/manifests/pkgcpan.pp b/deployment/websites/manifests/pkgcpan.pp
new file mode 100644
index 00000000..2e306a93
--- /dev/null
+++ b/deployment/websites/manifests/pkgcpan.pp
@@ -0,0 +1,24 @@
+class websites {
+ class pkgcpan inherits base {
+ $vhost = "pkgcpan.$domain"
+ $vhostdir = "$webdatadir/$vhost"
+
+ apache::vhost_base { "$vhost":
+ location => $vhostdir,
+ options => [ "Indexes" ],
+ }
+
+ file { $vhostdir:
+ ensure => directory,
+ }
+
+ package { "perl-Module-Packaged-Generator": }
+
+ # FIXME do not run as root ( apache or nobody should enough )
+ cron { "update cpanpkg":
+ hour => 23,
+ require => Package['perl-Module-Packaged-Generator'],
+ command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
+ }
+ }
+}