aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites/manifests')
-rw-r--r--deployment/websites/manifests/pkgcpan.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/deployment/websites/manifests/pkgcpan.pp b/deployment/websites/manifests/pkgcpan.pp
index d4d1f8ed..2e361dfd 100644
--- a/deployment/websites/manifests/pkgcpan.pp
+++ b/deployment/websites/manifests/pkgcpan.pp
@@ -2,6 +2,13 @@ class websites::pkgcpan {
include websites::base
$vhost = "pkgcpan.$::domain"
$vhostdir = "$websites::base::webdatadir/$vhost"
+ $pkgcpan_login = 'pkgcpan'
+ $pkgcpan_homedir = "/var/lib/$pkgcpan_login"
+
+ user { $pkgcpan_login:
+ managehome => true,
+ home => $pkgcpan_homedir,
+ }
apache::vhost_base { $vhost:
location => $vhostdir,
@@ -10,14 +17,17 @@ class websites::pkgcpan {
file { $vhostdir:
ensure => directory,
+ owner => $pkgcpan_login,
+ group => $pkgcpan_login,
}
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",
+ user => $pkgcpan_login,
+ require => User[$pkgcpan_login],
}
}