Logrotate::Rule Manage Olddir location
Opened this issue · 7 comments
corey-hammerton commented
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 3.8.7
- Ruby: 1.8.7
- Distribution: CentOS 6.6
- Module version: 1.4.0
How to reproduce (e.g Puppet code you use)
logrotate::rule{"httpd": "olddir" => "/var/log/httpd/old" ... }
What are you seeing
/etc/logrotate.d/httpd
olddir /var/log/httpd/old
Directory does not exist on the filesystem.
What behaviour did you expect instead
The olddir directory created and maintained on the node's filesystem
Output log
Any additional information you'd like to impart
robinbowes commented
If I surface the createolddir
option, would that fix your issue?
corey-hammerton commented
Logrotate has a createolddir
option? I can't seem to find it in any man page
robinbowes commented
On Centos 6.8:
createolddir mode owner group
If the directory specified by olddir directive does not exist, it is created. mode specifies
the mode for the olddir directory in octal (the same as chmod(2)), owner specifies the user
name who will own the olddir directory, and group specifies the group the olddir directory
will belong to. This option can be disabled using the nocreateolddir option.
corey-hammerton commented
It will win the long run, however for earlier versions we would still have to create that directory manually.
FYI we will not be able to upgrade to CentOS 6.8 or later.
robinbowes commented
On what platforms/versions are you using this?
corey-hammerton commented
CentOS 6.0 - 6.6. Some 5.6.
robinbowes commented
Damn, we claim to support 5, 6, & 7 ;)
I'll see what I can do...