voxpupuli/puppet-logrotate

Unable to disable cron for hourly rotations

Closed this issue · 4 comments

The default crontab on a Ubuntu machine runs hourly/daily/weekly/monthly jobs at offsets off of the hour which is highly undesirable for log rotations which should be done on the hour.

For daily jobs we have told the logrotate module to not manage cron, and then used puppet/cron to create an appropriate job that runs at 00:00 each day.

But there is no way to tell logrotate module to not manage cron for hourly rotations.

Is there any chance this module can be transitioned to use puppet/cron which supports creating cron jobs where you can specify the exact hour, minute, day, week, etc.
https://forge.puppet.com/puppet/cron

In theory then logrotate::cron could simply call puppet/cron

The issue I see is the lack of FreeBSD support in puppet/cron and if that is still important to this module then I suggest we provide a flag manage_cron_hourly so hourly jobs be set to be unmanaged.

Hi @acurus-puppetmaster, can you create a PR for this?

For which option

  1. Mechanism to disable managing hourly cron
  2. Switch whole module to puppet/cron

Submitted PR #137 but cannot figure out why travis ci tasks are failing, can anyone help?

PR #137 now approved awaiting merge