puppet-logrotate: rotate must be an integer

The parsing of rotate appears to differ from the official documentation. In the examples, rotate is presented as a Ruby Fixnum. In the code, the match criteria appears to only work for numeric characters from a Ruby String.

This is working for me:

  logrotate::rule { 'redis_6384':
    path          => '/var/log/redis_6384.log',
    rotate        => '4',
    mail          => '',
    rotate_every  => 'week'
  }

This block returns an error:

  logrotate::rule { 'redis_6384':
    path          => '/var/log/redis_6384.log',
    rotate        => 4,
    mail          => '',
    rotate_every  => 'week'
  }

==> data: Error: Logrotate::Rule[redis_6384]: rotate must be an integer on node db01.hostname.dev

Am I misunderstanding something? Is the documentation wrong? Is the parser incorrect?

Thanks!

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 17

Commits related to this issue

Most upvoted comments

go with this fork, approved by puppet folks https://forge.puppet.com/yo61/logrotate

Just ran into this. What is stopping this from progressing to a patch release?

Hey, any progress here? could you bump the version to release the fix?

just a note - https://github.com/rodjek/puppet-logrotate/commit/d569bcee1b43fa1af816c21afb5664d8e5235553 fixes this issue. use master instead of 1.1.1, or @rodjek may be nice enough to arrange a version bump? 😃