Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for optional "weekday" missing from "rotate_every" #203

Open
redst011 opened this issue Jan 26, 2023 · 0 comments
Open

Support for optional "weekday" missing from "rotate_every" #203

redst011 opened this issue Jan 26, 2023 · 0 comments

Comments

@redst011
Copy link

Affected Puppet, OS and module versions/distributions

  • Puppet: v2021.7.1
  • Distribution: Ubuntu 18.04.6 LTS
  • Module version: 6.1.0

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

logrotate::config:
  rotate_every:  'weekly 0'

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Logrotate::Conf[/etc/logrotate.conf]: parameter 'rotate_every' expects a match for Logrotate::Every = Pattern[/^hour(|ly)$/, /^da(|il)y$/, /^week(|ly)$/, /^month(|ly)$/, /^year(|ly)$/], got 'weekly 0' (file: /etc/puppetlabs/code/environments/feature_logrotate_mod/modules/logrotate/manifests/config.pp, line: 21) on node...

What behaviour did you expect instead

Support for putting an optional "weekday" as per the man page:

   weekly [weekday]
          Log files are rotated once each weekday, or if the date is advanced by at least 7 days since the last rotation (while ignoring the exact time).  The weekday interpretation is following:  0 means Sun\u2010
          day, 1 means Monday, ..., 6 means Saturday; the special value 7 means each 7 days, irrespectively of weekday.  Defaults to 0 if the weekday argument is omitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant