diff options
author | Nicolas Vigier <boklm@mageia.org> | 2012-02-23 11:28:14 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2012-02-23 11:28:14 +0000 |
commit | 85d19d4bfb0149509a44ed75d55dcd3a33bc2409 (patch) | |
tree | 9abaa4b0585ae2ae3f80135829525c5d91da612a /deployment/websites/manifests/pkgcpan.pp | |
parent | 4f6980888f9f2f7673098e3bb0ebd234c65b180e (diff) | |
download | puppet-85d19d4bfb0149509a44ed75d55dcd3a33bc2409.tar puppet-85d19d4bfb0149509a44ed75d55dcd3a33bc2409.tar.gz puppet-85d19d4bfb0149509a44ed75d55dcd3a33bc2409.tar.bz2 puppet-85d19d4bfb0149509a44ed75d55dcd3a33bc2409.tar.xz puppet-85d19d4bfb0149509a44ed75d55dcd3a33bc2409.zip |
don't run pkgcpan as root, create a user for pkgcpan
Diffstat (limited to 'deployment/websites/manifests/pkgcpan.pp')
-rw-r--r-- | deployment/websites/manifests/pkgcpan.pp | 12 |
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], } } |