voxpupuli/puppet-logrotate

Logrotate::Rule Manage Olddir location

Opened this issue · 7 comments

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

If I surface the createolddir option, would that fix your issue?

Logrotate has a createolddir option? I can't seem to find it in any man page

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.

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.

On what platforms/versions are you using this?

CentOS 6.0 - 6.6. Some 5.6.

Damn, we claim to support 5, 6, & 7 ;)

I'll see what I can do...