
It's trying to rotate /var/log/planet/planet.log -- it's actually /var/log/planet/openstack.log as specified in the cron entry above. Move the logrotate into the site.pp so it picks up the right ${name} Change-Id: Ic57c8325b3e44890a58273d2bad1e59fbeac682c
43 lines
1.0 KiB
Puppet
43 lines
1.0 KiB
Puppet
define planet::site(
|
|
$git_url,
|
|
$vhost_name = "planet.${name}.org"
|
|
) {
|
|
include ::httpd
|
|
include ::logrotate
|
|
|
|
::httpd::vhost { $vhost_name:
|
|
docroot => "/srv/planet/${name}",
|
|
port => 80,
|
|
priority => '50',
|
|
require => File['/srv/planet'],
|
|
}
|
|
|
|
vcsrepo { "/var/lib/planet/${name}":
|
|
ensure => present,
|
|
provider => git,
|
|
require => File['/var/lib/planet'],
|
|
source => $git_url,
|
|
}
|
|
|
|
cron { "update_planet_${name}":
|
|
command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && git pull -q --ff-only && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1",
|
|
minute => '*/15',
|
|
user => 'root',
|
|
}
|
|
|
|
logrotate::file { "${name}.log":
|
|
log => "/var/log/planet/${name}.log",
|
|
options => [
|
|
'compress',
|
|
'copytruncate',
|
|
'missingok',
|
|
'rotate 7',
|
|
'daily',
|
|
'notifempty',
|
|
],
|
|
}
|
|
|
|
}
|
|
|
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|