voxpupuli/puppet-logrotate

path does not support glob patterns

Opened this issue · 0 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.25.1
  • Ruby: bundled
  • Distribution: Ubuntu 20.04
  • Module version: 6.0.0

How to reproduce (e.g Puppet code you use)

Define a log rotate rule with paths that use glob patterns, i.e.

logrotate::rule {'test':
   path => '/var/log/basedir/*/*/*.log',
   ...
}

What are you seeing

Logrotate::Rule[test]: parameter 'path' expects a Logrotate::Path = Variant[Stdlib::Unixpath = Pattern[/\A\/([^
\/\0]+\/*)*\z/], Array[Stdlib::Unixpath = Pattern[/\A\/([^
\/\0]+\/*)*\z/]]] value, got String

What behaviour did you expect instead

/etc/logrotete.d/test file containing:

/var/log/basedir/*/*/*.log {
   ...
}