Manage logrotate




908 latest version

5.0 quality score

Version information

  • 0.3.0 (latest)
  • 0.2.0
released Jun 18th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • Debian

Start using this module

Tags: logrotate


marionetoj/logrotate — version 0.3.0 Jun 18th 2020

CI status Contributor Covenant


Manage Logrotate base configuration and rules.

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Contributing - Guide for contributing to the module


From logrotate’s documentation:

logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.


This module's default values should be the same as your distribution defaults:

include logrotate

But you can customize everything:

class { '::logrotate':
  purge_unmanaged_rules => false,
  global_settings       => {
    compress     => true,
    create       => true,
    ifempty      => false,
    missingok    => true,
    rotate       => 30,
    frequency    => 'daily',
    copytruncate => true,

You can then create rules with the logrotate::rule defined type:

logrotate::rule { '/var/log/syslog':
  rotate        => 7,
  frequency     => 'daily',
  missingok     => true,
  ifempty       => false,
  delaycompress => true,
  compress      => true,
  postrotate    => [


A complete reference can be found in the REFERENCE.md file.


This module has only been tested on Debian 9 and 10, but it should work with older and newer version as well as with Ubuntu 18.04 and later.


This Puppet module is Free Software, every contributions are welcome.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.