Move logrotate to site.pp
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
This commit is contained in:
parent
36f03ff9c4
commit
4637705ab5
|
@ -1,6 +1,4 @@
|
|||
class planet {
|
||||
include ::logrotate
|
||||
|
||||
package { 'planet-venus':
|
||||
ensure => present,
|
||||
}
|
||||
|
@ -17,18 +15,6 @@ class planet {
|
|||
ensure => directory,
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -3,6 +3,7 @@ define planet::site(
|
|||
$vhost_name = "planet.${name}.org"
|
||||
) {
|
||||
include ::httpd
|
||||
include ::logrotate
|
||||
|
||||
::httpd::vhost { $vhost_name:
|
||||
docroot => "/srv/planet/${name}",
|
||||
|
@ -23,6 +24,19 @@ define planet::site(
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue