Forge Home

logrotate

Manage logrotate

2,200 downloads

1,491 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'marionetoj-logrotate', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add marionetoj-logrotate
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install marionetoj-logrotate --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: logrotate

Documentation

marionetoj/logrotate — version 0.3.0 Jun 18th 2020

CI status Contributor Covenant

logrotate

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

Description

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.

Usage

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    => [
    '/usr/lib/rsyslog/rsyslog-rotate',
  ]
}

Reference

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

Limitations

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.

Contributing

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.