Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-logrotate', '7.1.0'
Learn more about managing modules with a PuppetfileDocumentation
Logrotate module for Puppet
Description
A more Puppety way of managing logrotate configs. Where possible, as many of the configuration options have remained the same with a couple of notable exceptions:
- Booleans are now used instead of the
<something>
/no<something>
pattern. e.g.copy
==copy => true
,nocopy
==copy => false
. create
and its three optional arguments have been split into seperate parameters documented below.- Instead of 'daily', 'weekly', 'monthly' or 'yearly', there is a
rotate_every
parameter (see documentation below).
logrotate::conf
You may, optionally, define logrotate defaults using this defined type.
Parameters are the same as those for logrotate::rule.
Using this type will automatically include a private class that will install
and configure logrotate for you.
You must not also declare the logrotate
class if using this defined type as you will encounter a Puppet error if you attempt to do so.
logrotate::rule
The only thing you'll need to deal with, this type configures a logrotate rule. Using this type will automatically include a private class that will install and configure logrotate for you.
namevar - The String name of the rule.
path - The path(s) to the log file(s) to be rotated. May be a
String or an Array of Strings.
ensure - The desired state of the logrotate rule as a String. Valid
values are 'absent' and 'present' (default: 'present').
compress - A Boolean value specifying whether the rotated logs should
be compressed (optional).
compresscmd - The command String that should be executed to compress the
rotated logs (optional).
compressext - The extention String to be appended to the rotated log files
after they have been compressed (optional).
compressoptions - A String of command line options to be passed to the
compression program specified in `compresscmd` (optional).
copy - A Boolean specifying whether logrotate should just take a
copy of the log file and not touch the original (optional).
copytruncate - A Boolean specifying whether logrotate should truncate the
original log file after taking a copy (optional).
create - A Boolean specifying whether logrotate should create a new
log file immediately after rotation (optional).
create_mode - An octal mode String logrotate should apply to the newly
created log file if create => true (optional).
create_owner - A username String that logrotate should set the owner of the
newly created log file to if create => true (optional).
create_group - A String group name that logrotate should apply to the newly
created log file if create => true (optional).
dateext - A Boolean specifying whether rotated log files should be
archived by adding a date extension rather just a number
(optional).
dateformat - The format String to be used for `dateext` (optional).
Valid specifiers are '%Y', '%m', '%d' and '%s'.
dateyesterday - A Boolean specifying whether to use yesterday's date instead
of today's date to create the `dateext` extension (optional).
delaycompress - A Boolean specifying whether compression of the rotated
log file should be delayed until the next logrotate run
(optional).
extension - Log files with this extension String are allowed to keep it
after rotation (optional).
ifempty - A Boolean specifying whether the log file should be rotated
even if it is empty (optional).
mail - The email address String that logs that are about to be
rotated out of existence are emailed to (optional).
mailfirst - A Boolean that when used with `mail` has logrotate email the
just rotated file rather than the about to expire file
(optional).
maillast - A Boolean that when used with `mail` has logrotate email the
about to expire file rather than the just rotated file
(optional).
maxage - The Integer maximum number of days that a rotated log file
can stay on the system (optional).
minsize - The String minimum size a log file must be to be rotated,
but not before the scheduled rotation time (optional).
The default units are bytes, append k, M or G for kilobytes,
megabytes and gigabytes respectively.
maxsize - The String maximum size a log file may be to be rotated;
When maxsize is used, both the size and timestamp of a log
file are considered for rotation.
The default units are bytes, append k, M or G for kilobytes,
megabytes and gigabytes respectively.
missingok - A Boolean specifying whether logrotate should ignore missing
log files or issue an error (optional).
olddir - A String path to a directory that rotated logs should be
moved to (optional).
postrotate - A command String that should be executed by /bin/sh after
the log file is rotated (optional).
prerotate - A command String that should be executed by /bin/sh before
the log file is rotated and only if it will be rotated
(optional).
firstaction - A command String that should be executed by /bin/sh once
before all log files that match the wildcard pattern are
rotated (optional).
lastaction - A command String that should be execute by /bin/sh once
after all the log files that match the wildcard pattern are
rotated (optional).
rotate - The Integer number of rotated log files to keep on disk
(optional).
rotate_every - How often the log files should be rotated as a String.
Valid values are 'hour', 'day', 'week', 'month' and 'year'
(optional). Please note, older versions of logrotate do not
support yearly log rotation.
size - The String size a log file has to reach before it will be
rotated (optional). The default units are bytes, append k,
M or G for kilobytes, megabytes or gigabytes respectively.
sharedscripts - A Boolean specifying whether logrotate should run the
postrotate and prerotate scripts for each matching file or
just once (optional).
shred - A Boolean specifying whether logs should be deleted with
shred instead of unlink (optional).
shredcycles - The Integer number of times shred should overwrite log files
before unlinking them (optional).
start - The Integer number to be used as the base for the extensions
appended to the rotated log files (optional).
su_user - A username String that logrotate should use to rotate a
log file set instead of using the default if
su => true (optional).
su_group - A String group name that logrotate should use to rotate a
log file set instead of using the default if
su => true (optional).
uncompresscmd - The String command to be used to uncompress log files
(optional).
Further details about these options can be found by reading man 8 logrotate
.
logrotate
You may, optionally, declare the main ::logrotate
class to adjust some of the
defaults that are used when installing the logrotate package and creating the
main /etc/logrotate.conf
configuration file.
This example will ensure that the logrotate package is latest and that the dateext
and compress
options are added to the defaults for a node.
class { 'logrotate':
ensure => 'latest',
config => {
dateext => true,
compress => true,
rotate => 10,
rotate_every => 'week',
ifempty => true,
}
}
Additional startup arguments
With parameter logrotate_args
you can specify additional startup arguments for logrotate. Configuration file is always added as the last argument for logrotate.
This example tells logrotate to use an alternate state file and which command to use when mailing logs.
class { 'logrotate':
ensure => 'latest',
logrotate_args => ['-s /var/lib/logrotate/logrotate.status', '-m /usr/local/bin/mailer']
}
Cron output
By default, the cron output is discarded if there is no error output. To enable this output, when you (for example) enable the verbose startup argument, enable the cron_always_output
boolean on the logrotate class:
class { 'logrotate':
ensure => 'latest',
cron_always_output => true,
config => {
...
}
}
Examples
logrotate::conf { '/etc/logrotate.conf':
rotate => 10,
rotate_every => 'week',
ifempty => true,
dateext => true,
}
logrotate::rule { 'messages':
path => '/var/log/messages',
rotate => 5,
rotate_every => 'week',
postrotate => '/usr/bin/killall -HUP syslogd',
}
logrotate::rule { 'servicelogs':
path => ['/var/log/this-service.log', '/var/log/that-app.log'],
rotate => 5,
rotate_every => 'day',
postrotate => '/usr/bin/kill -HUP `cat /run/syslogd.pid`',
}
logrotate::rule { 'apache':
path => '/var/log/httpd/*.log',
rotate => 5,
mail => 'test@example.com',
size => '100k',
sharedscripts => true,
postrotate => '/etc/init.d/httpd restart',
}
Authors and Module History
Puppet-logrotate has been maintained by VoxPupuli since version 2.0.0. It was migrated from https://forge.puppet.com/yo61/logrotate. yo61's version was a fork of https://github.com/rodjek/puppet-logrotate. It is licensed under the MIT license.
Reference
Table of Contents
Classes
logrotate
logrotate::config
: logrotate configlogrotate::defaults
: apply defaultslogrotate::hourly
: Internal: Configure a host for hourly logrotate jobs. ensure - The desired state of hourly logrotate support. Valid values are 'ablogrotate::install
: make sure logrotate is installedlogrotate::params
: == Class: logrotate::params Params class for logrotate modulelogrotate::rules
: apply user-defined rules
Defined types
logrotate::conf
: Internal: Install and configure logrotate defaults file, usually /etc/logrotate.conf see logrotate::Conf for description of options. Examlogrotate::cron
logrotate::rule
: Public: Configure logrotate to rotate a logfile. namevar - The String name of the rule. path - The path String to the log
Data types
Classes
logrotate
The logrotate class.
Parameters
The following parameters are available in the logrotate
class:
ensure
hieramerge
manage_cron_daily
manage_cron_hourly
ensure_cron_daily
ensure_cron_hourly
manage_systemd_timer
ensure_systemd_timer
create_base_rules
purge_configdir
package
rules
config
cron_daily_hour
cron_daily_minute
cron_hourly_minute
cron_file_mode
configdir
logrotate_bin
logrotate_conf
logrotate_conf_mode
manage_package
rules_configdir
rules_configdir_mode
root_user
root_group
logrotate_args
cron_always_output
ensure
Data type: String
Default value: present
hieramerge
Data type: Boolean
Default value: false
manage_cron_daily
Data type: Boolean
Default value: true
manage_cron_hourly
Data type: Boolean
Default value: true
ensure_cron_daily
Data type: Enum[present,absent]
Default value: 'present'
ensure_cron_hourly
Data type: Enum[present,absent]
Default value: 'present'
manage_systemd_timer
Data type: Boolean
Default value: false
ensure_systemd_timer
Data type: Enum[present,absent]
Default value: 'absent'
create_base_rules
Data type: Boolean
Default value: true
purge_configdir
Data type: Boolean
Default value: false
package
Data type: String
Default value: 'logrotate'
rules
Data type: Hash
Default value: {}
config
Data type: Optional[Hash]
Default value: undef
cron_daily_hour
Data type: Integer[0,23]
Default value: $logrotate::params::cron_daily_hour
cron_daily_minute
Data type: Integer[0,59]
Default value: $logrotate::params::cron_daily_minute
cron_hourly_minute
Data type: Integer[0,59]
Default value: $logrotate::params::cron_hourly_minute
cron_file_mode
Data type: Stdlib::Filemode
Default value: $logrotate::params::cron_file_mode
configdir
Data type: String
Default value: $logrotate::params::configdir
logrotate_bin
Data type: String
Default value: $logrotate::params::logrotate_bin
logrotate_conf
Data type: String
Default value: $logrotate::params::logrotate_conf
logrotate_conf_mode
Data type: Stdlib::Filemode
Default value: $logrotate::params::logrotate_conf_mode
manage_package
Data type: Boolean
Default value: $logrotate::params::manage_package
rules_configdir
Data type: String
Default value: $logrotate::params::rules_configdir
rules_configdir_mode
Data type: Stdlib::Filemode
Default value: $logrotate::params::rules_configdir_mode
root_user
Data type: String
Default value: $logrotate::params::root_user
root_group
Data type: String
Default value: $logrotate::params::root_group
logrotate_args
Data type: Array[String[1]]
Default value: []
cron_always_output
Data type: Boolean
Default value: false
logrotate::config
logrotate config
logrotate::defaults
apply defaults
Parameters
The following parameters are available in the logrotate::defaults
class:
create_base_rules
Data type: Any
Default value: $logrotate::create_base_rules
rules
Data type: Any
Default value: $logrotate::params::base_rules
rule_default
Data type: Any
Default value: $logrotate::params::rule_default
logrotate::hourly
Internal: Configure a host for hourly logrotate jobs.
ensure - The desired state of hourly logrotate support. Valid values are 'absent' and 'present' (default: 'present').
Examples
Set up hourly logrotate jobs
class { 'logrotate': manage_cron_hourly => true, }
Remove hourly logrotate job support
class { 'logrotate': manage_cron_hourly => true, ensure_cron_hourly => absent, }
logrotate::install
make sure logrotate is installed
logrotate::params
== Class: logrotate::params
Params class for logrotate module
logrotate::rules
apply user-defined rules
Parameters
The following parameters are available in the logrotate::rules
class:
rules
Data type: Any
Default value: $logrotate::rules
Defined types
logrotate::conf
Internal: Install and configure logrotate defaults file, usually /etc/logrotate.conf
see logrotate::Conf for description of options.
Examples
logrotate::conf{'/etc/logrotate.conf':}
Parameters
The following parameters are available in the logrotate::conf
defined type:
path
ensure
compress
compresscmd
compressext
compressoptions
copy
copytruncate
create
create_mode
create_owner
create_group
dateext
dateformat
dateyesterday
delaycompress
extension
ifempty
mail
mail_when
maxage
minsize
maxsize
missingok
olddir
postrotate
prerotate
firstaction
lastaction
rotate
rotate_every
size
sharedscripts
shred
shredcycles
start
su
su_user
su_group
uncompresscmd
path
Data type: Stdlib::Unixpath
Default value: $name
ensure
Data type: Enum['absent','present']
Default value: 'present'
compress
Data type: Optional[Boolean]
Default value: undef
compresscmd
Data type: Optional[String]
Default value: undef
compressext
Data type: Optional[String]
Default value: undef
compressoptions
Data type: Optional[String]
Default value: undef
copy
Data type: Optional[Boolean]
Default value: undef
copytruncate
Data type: Optional[Boolean]
Default value: undef
create
Data type: Boolean
Default value: true
create_mode
Data type: Optional[String]
Default value: undef
create_owner
Data type: Optional[String]
Default value: undef
create_group
Data type: Optional[String]
Default value: undef
dateext
Data type: Optional[Boolean]
Default value: undef
dateformat
Data type: Optional[String]
Default value: undef
dateyesterday
Data type: Optional[Boolean]
Default value: undef
delaycompress
Data type: Optional[Boolean]
Default value: undef
extension
Data type: Optional[String]
Default value: undef
ifempty
Data type: Optional[Boolean]
Default value: undef
mail
Data type: Optional[Variant[String,Boolean]]
Default value: undef
mail_when
Data type: Optional[Enum['mailfirst', 'maillast']]
Default value: undef
maxage
Data type: Optional[Integer]
Default value: undef
minsize
Data type: Optional[Logrotate::Size]
Default value: undef
maxsize
Data type: Optional[Logrotate::Size]
Default value: undef
missingok
Data type: Optional[Boolean]
Default value: undef
olddir
Data type: Optional[Variant[Boolean,String]]
Default value: undef
postrotate
Data type: Optional[String]
Default value: undef
prerotate
Data type: Optional[String]
Default value: undef
firstaction
Data type: Optional[String]
Default value: undef
lastaction
Data type: Optional[String]
Default value: undef
rotate
Data type: Integer
Default value: 4
rotate_every
Data type: Logrotate::Every
Default value: 'weekly'
size
Data type: Optional[Logrotate::Size]
Default value: undef
sharedscripts
Data type: Optional[Boolean]
Default value: undef
shred
Data type: Optional[Boolean]
Default value: undef
shredcycles
Data type: Optional[Integer]
Default value: undef
start
Data type: Optional[Integer]
Default value: undef
su
Data type: Boolean
Default value: false
su_user
Data type: String
Default value: 'root'
su_group
Data type: String
Default value: 'root'
uncompresscmd
Data type: Optional[String]
Default value: undef
logrotate::cron
The logrotate::cron class.
Parameters
The following parameters are available in the logrotate::cron
defined type:
ensure
Data type: Any
Default value: 'present'
logrotate::rule
Public: Configure logrotate to rotate a logfile.
namevar - The String name of the rule.
path - The path String to the logfile(s) to be rotated.
ensure - The desired state of the logrotate rule as a String. Valid
values are 'absent' and 'present' (default: 'present').
compress - A Boolean value specifying whether the rotated logs should
be compressed (optional).
compresscmd - The command String that should be executed to compress the
rotated logs (optional).
compressext - The extention String to be appended to the rotated log files
after they have been compressed (optional).
compressoptions - A String of command line options to be passed to the
compression program specified in compresscmd
(optional).
copy - A Boolean specifying whether logrotate should just take a
copy of the log file and not touch the original (optional).
copytruncate - A Boolean specifying whether logrotate should truncate the
original log file after taking a copy (optional).
create - A Boolean specifying whether logrotate should create a new
log file immediately after rotation (optional).
create_mode - An octal mode String logrotate should apply to the newly
created log file if create => true (optional).
create_owner - A username String that logrotate should set the owner of the
newly created log file to if create => true (optional).
create_group - A String group name that logrotate should apply to the newly
created log file if create => true (optional).
dateext - A Boolean specifying whether rotated log files should be
archived by adding a date extension rather just a number
(optional).
dateformat - The format String to be used for dateext
(optional).
Valid specifiers are '%Y', '%m', '%d' and '%s'.
dateyesterday - A Boolean specifying whether to use yesterday's date instead
of today's date to create the dateext
extension (optional).
delaycompress - A Boolean specifying whether compression of the rotated
log file should be delayed until the next logrotate run
(optional).
extension - Log files with this extension String are allowed to keep it
after rotation (optional).
ifempty - A Boolean specifying whether the log file should be rotated
even if it is empty (optional).
mail - The email address String that logs that are about to be
rotated out of existence are emailed to (optional).
mailfirst - A Boolean that when used with mail
has logrotate email the
just rotated file rather than the about to expire file
(optional).
maillast - A Boolean that when used with mail
has logrotate email the
about to expire file rather than the just rotated file
(optional).
maxage - The Integer maximum number of days that a rotated log file
can stay on the system (optional).
minsize - The String minimum size a log file must be to be rotated,
but not before the scheduled rotation time (optional).
The default units are bytes, append k, M or G for kilobytes,
megabytes and gigabytes respectively.
maxsize - The String maximum size a log file may be to be rotated;
When maxsize is used, both the size and timestamp of a log
file are considered for rotation.
The default units are bytes, append k, M or G for kilobytes,
megabytes and gigabytes respectively.
missingok - A Boolean specifying whether logrotate should ignore missing
log files or issue an error (optional).
olddir - A String path to a directory that rotated logs should be
moved to (optional).
postrotate - A command String or an Array of Strings that should be
executed by /bin/sh after the log file is rotated
optional).
prerotate - A command String or an Array of Strings that should be
executed by /bin/sh before the log file is rotated and
only if it will be rotated (optional).
firstaction - A command String or an Array of Strings that should be
executed by /bin/sh once before all log files that match
the wildcard pattern are rotated (optional).
lastaction - A command String or an Array of Strings that should be
executed by /bin/sh once after all the log files that match
the wildcard pattern are rotated (optional).
rotate - The Integer number of rotated log files to keep on disk
(optional).
rotate_every - How often the log files should be rotated as a String.
Valid values are 'day', 'week', 'month' and 'year'
(optional).
size - The String size a log file has to reach before it will be
rotated (optional). The default units are bytes, append k,
M or G for kilobytes, megabytes or gigabytes respectively.
sharedscripts - A Boolean specifying whether logrotate should run the
postrotate and prerotate scripts for each matching file or
just once (optional).
shred - A Boolean specifying whether logs should be deleted with
shred instead of unlink (optional).
shredcycles - The Integer number of times shred should overwrite log files
before unlinking them (optional).
start - The Integer number to be used as the base for the extensions
appended to the rotated log files (optional).
su - A Boolean specifying whether logrotate should rotate under
the specific su_user and su_group instead of the default.
First available in logrotate 3.8.0.
su_user - A String username that logrotate should use to rotate a
log file set instead of using the default if
su => true (optional)
su_group - A String group name that logrotate should use to rotate a
log file set instead of using the default if
su => true (optional).
uncompresscmd - The String command to be used to uncompress log files
(optional).
custom_cfg - Array of custom lines to be appended to the rules
Examples
Rotate /var/log/syslog daily and keep 7 days worth of compressed logs.
logrotate::rule { 'messages': path => '/var/log/messages', copytruncate => true, missingok => true, rotate_every => 'day', rotate => 7, compress => true, ifempty => true, }
Rotate /var/log/nginx/access_log weekly and keep 3 weeks of logs
logrotate::rule { 'nginx_access_log': path => '/var/log/nginx/access_log', missingok => true, rotate_every => 'week', rotate => 3, postrotate => '/etc/init.d/nginx restart', }
Parameters
The following parameters are available in the logrotate::rule
defined type:
rulename
ensure
custom_cfg
path
compress
compresscmd
compressext
compressoptions
copy
copytruncate
create
create_mode
create_owner
create_group
dateext
dateformat
dateyesterday
delaycompress
extension
ifempty
mail
mail_when
maxage
minsize
maxsize
missingok
olddir
postrotate
prerotate
firstaction
lastaction
rotate
rotate_every
size
sharedscripts
shred
shredcycles
start
su
su_user
su_group
uncompresscmd
rulename
Data type: Pattern[/^[a-zA-Z0-9\._-]+$/]
Default value: $title
ensure
Data type: Enum['present','absent']
Default value: 'present'
custom_cfg
Data type: Array[String[1]]
Default value: []
path
Data type: Optional[Logrotate::Path]
Default value: undef
compress
Data type: Optional[Boolean]
Default value: undef
compresscmd
Data type: Optional[String]
Default value: undef
compressext
Data type: Optional[String]
Default value: undef
compressoptions
Data type: Optional[String]
Default value: undef
copy
Data type: Optional[Boolean]
Default value: undef
copytruncate
Data type: Optional[Boolean]
Default value: undef
create
Data type: Optional[Boolean]
Default value: undef
create_mode
Data type: Optional[String]
Default value: undef
create_owner
Data type: Optional[String]
Default value: undef
create_group
Data type: Optional[String]
Default value: undef
dateext
Data type: Optional[Boolean]
Default value: undef
dateformat
Data type: Optional[String]
Default value: undef
dateyesterday
Data type: Optional[Boolean]
Default value: undef
delaycompress
Data type: Optional[Boolean]
Default value: undef
extension
Data type: Optional[String]
Default value: undef
ifempty
Data type: Optional[Boolean]
Default value: undef
mail
Data type: Optional[Variant[String,Boolean]]
Default value: undef
mail_when
Data type: Optional[Enum['mailfirst','maillast']]
Default value: undef
maxage
Data type: Optional[Integer]
Default value: undef
minsize
Data type: Optional[Logrotate::Size]
Default value: undef
maxsize
Data type: Optional[Logrotate::Size]
Default value: undef
missingok
Data type: Optional[Boolean]
Default value: undef
olddir
Data type: Optional[Variant[Boolean,String]]
Default value: undef
postrotate
Data type: Optional[Logrotate::Commands]
Default value: undef
prerotate
Data type: Optional[Logrotate::Commands]
Default value: undef
firstaction
Data type: Optional[Logrotate::Commands]
Default value: undef
lastaction
Data type: Optional[Logrotate::Commands]
Default value: undef
rotate
Data type: Optional[Integer]
Default value: undef
rotate_every
Data type: Optional[Logrotate::Every]
Default value: undef
size
Data type: Optional[Logrotate::Size]
Default value: undef
sharedscripts
Data type: Optional[Boolean]
Default value: undef
shred
Data type: Optional[Boolean]
Default value: undef
shredcycles
Data type: Optional[Integer]
Default value: undef
start
Data type: Optional[Integer]
Default value: undef
su
Data type: Boolean
Default value: false
su_user
Data type: String
Default value: 'root'
su_group
Data type: String
Default value: 'root'
uncompresscmd
Data type: Optional[String]
Default value: undef
Data types
Logrotate::Commands
The Logrotate::Commands data type.
Alias of Variant[String, Array[String]]
Logrotate::Every
The Logrotate::Every data type.
Alias of Pattern['^hour(|ly)$', '^da(|il)y$', '^week(|ly)$', '^month(|ly)$', '^year(|ly)$']
Logrotate::Path
The Logrotate::Path data type.
Alias of Variant[Stdlib::UnixPath, Array[Stdlib::UnixPath]]
Logrotate::Size
The Logrotate::Size data type.
Alias of Variant[Integer, Pattern[/^\d+[kMG]?$/]]
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v7.1.0 (2024-07-23)
Implemented enhancements:
- Add Debian 11 & 12 support #234 (bastelfreak)
- Add AlmaLinux/Rocky 8 & 9 support #233 (bastelfreak)
- OracleLinux: Add 8 & 9 support #230 (bastelfreak)
- update puppet-systemd upper bound to 8.0.0 #226 (TheMeier)
- Remove legacy top-scope syntax #215 (smortex)
v7.0.2 (2024-02-28)
Fixed bugs:
- Support hourly logrotate directory on EL9 again. #221 (traylenator)
- Remove the managed hourly directory if the class is disabled #192 (flynet70)
v7.0.1 (2023-12-05)
Fixed bugs:
v7.0.0 (2023-08-02)
Breaking changes:
- Drop Eol Debian 9 Support #206 (traylenator)
Implemented enhancements:
- Add Puppet 8 support #209 (bastelfreak)
- puppetlabs/stdlib: Allow 9.x #208 (bastelfreak)
Merged pull requests:
v6.1.0 (2022-07-20)
Implemented enhancements:
Fixed bugs:
Merged pull requests:
v6.0.0 (2021-09-28)
Breaking changes:
- Drop EoL Puppet 5. Ubuntu 16 and Debian 8 support #185 (bastelfreak)
- Drop EOL EL6 support #179 (ekohl)
- Fix cron management #174 (crazymind1337)
Implemented enhancements:
- Enable Puppet 7 support #184 (bastelfreak)
Closed issues:
- version 4 doesn't obey manage_cron_daily parameter #161
- how to disable file { $logrotate::cron_hourly_file: in hourly.pp #103
Merged pull requests:
- Allow stdlib 8.0.0 #182 (smortex)
- Resolve puppet-lint notices #175 (jcpunk)
- modulesync 3.0.0 & puppet-lint updates #173 (bastelfreak)
- Use voxpupuli-acceptance #172 (ekohl)
v5.0.0 (2020-04-04)
Breaking changes:
- drop Ubuntu 14.04 support #163 (bastelfreak)
Implemented enhancements:
- Add
custom_cfg
parameter tologrotate::rule
allowing custom lines to be appended to rule files #66 (triforce)
Fixed bugs:
Closed issues:
- Wrong logrotate bin path with Gentoo #167
Merged pull requests:
v4.0.0 (2019-09-19)
Breaking changes:
- modulesync 2.7.0 and drop puppet 4 #147 (bastelfreak)
Implemented enhancements:
- "su" and "su_owner" parameters are not accepted in "conf" #40
- Use modern facts and $facts hash for osfamily #151 (simmerz)
- Introduce new top level parameter manage_cron_hourly which defaults … #137 (cliff-wakefield)
Closed issues:
- Unable to disable cron for hourly rotations #136
Merged pull requests:
- Allow puppetlabs-stdlib 6 #156 (jaredledvina)
- Remove deprecated and unused is_hash function #155 (baurmatt)
- Remove occurences of su_owner #148 (adriankirchner)
- Document possible use of Array for paths #145 (dleske)
v3.4.0 (2018-10-06)
Breaking changes:
Implemented enhancements:
- add support for Debian 8/9 and Ubuntu 18.04 #134 (rj667)
- Rebase(2) of Pull Request #80 #128 (Heidistein)
- Enforce minimal string length on logrotate arguments. #127 (Heidistein)
- Allow cron to always mail its output. #124 (Heidistein)
Fixed bugs:
- Fix params for Ubuntu to ensure su is set #138 (acurus-puppetmaster)
Closed issues:
- Rerelease 3.3.0 as 3.3.1 #121
- Missing tag and Puppet Forge release for 3.3.0 #120
- check debian support #114
Merged pull requests:
- modulesync 2.0.0 #142 (dhollinger)
- Release 3.4.0 and allow puppet 6.x #141 (dhollinger)
- enable acceptance tests centos 6/7 ubuntu 14/16 #135 (bastelfreak)
- allow puppetlabs/stdlib 5.x #132 (bastelfreak)
v3.3.0 (2018-06-25)
Implemented enhancements:
- Allow change of file mode for generated files #70
- Fix freebsd default rules #111 (kapouik)
- Fix Issue 70 add file mode parameters #109 (TJM)
- Use logrotate::cron rather than file resource for hourly cron #105 (pavloos)
- Manage logrotate startup arguments #102 (ruriky)
Closed issues:
- duplicate resource or dependency cycle when attempting to set default options #116
Merged pull requests:
- (docs) Update readme with warning note and bigger example of defaults #117 (GeoffWilliams)
- Remove docker nodesets #115 (bastelfreak)
- drop EOL OSs; fix puppet version range #113 (bastelfreak)
v3.2.1 (2018-03-28)
Merged pull requests:
- bump puppet to latest supported version 4.10.0 #107 (bastelfreak)
v3.2.0 (2018-01-04)
Implemented enhancements:
- Deprecation warnings from newer stdlib #54
- Add option to not manage logrotate package #44
- Add manage_package parameter #97 (juniorsysadmin)
- Make the creation of default [bw]tmp-rulesets configurable #65 (mcgege)
- Add purge_configdir to purge old configs #23 (patricktoelle)
Fixed bugs:
- 'su root syslog' line missing in default logrotate.conf file for Ubuntu produced by this module #93
- Pattern matcher in Logrotate::UserOrGroup is too strict. Doesn't allow names with domain. #88
- Enum on package ensure is too restrictive #84
- logrotate::conf[/etc/logrotate.conf] #49
- copy and copytruncate marked in rules.pp as optional #31
- copytruncate => true affects logrotate::defaults wtmp and btmp rules #22
- Remove UserOrGroup type, use String #98 (juniorsysadmin)
- Allow logrotate version to be specified #96 (juniorsysadmin)
- Fix missing su line in default logrotate.conf on Ubuntu #92 (szponek)
- Add missing $maxsize option to Logrotate::Conf #90 (achermes)
Closed issues:
- parameter 'path' references an unresolved type 'Stdlib::UnixPath' #95
- logrotate::rule adds blank su to wtmp and btmp #41
- Add tests for all OSes for defaults.pp #3
Merged pull requests:
- Remove obsolete su parameter in documentation #91 (stefanandres)
v3.1.0 (2017-11-13)
Implemented enhancements:
- Allow dateyesterday at the global level #83 (cliff-wakefield)
Fixed bugs:
Closed issues:
- Config is not a string but a hash #77
- Support Ubuntu 16.04 #59
- Does this module attempt to apply the defaults for the GNU distribution? #48
v3.0.1 (2017-10-14)
Fixed bugs:
- wrong datatype for $config, s/String/Hash #78 (bastelfreak)
v3.0.0 (2017-10-10)
Closed issues:
- Remove old CHANGELOG or merge with CHANGELOG.md #69
Merged pull requests:
- Fix changelog #73 (alexjfisher)
- Added support for dateyesterday within logrotate::rule #71 (cliff-wakefield)
- BREAKING: Introduce Puppet 4 datatypes and drop Puppet 3 support #68 (mmerfort)
v2.0.0 (2017-05-25)
Closed issues:
- Logrotate rule ERB template should not take variables from the scope object #37
- Ubuntu Xenial 16.04 compaibility #34
- string 'undef' now treated as undef #26
- Allow adjustment of OS-specific defaults #9
Merged pull requests:
- Fix typo #58 (gabe-sky)
- Adding support for maxsize also in main config #57 (seefood)
- Fix rubocop checks #53 (coreone)
- Fixes #34 - Ubuntu Xenial and up support #43 (edestecd)
- Fixes #37 - Logrotate rule ERB template should not take variables from the scope object #38 (imriz)
- Fix puppet-lint issues and bad style #32 (baurmatt)
- Add gentoo support #27 (baurmatt)
v1.4.0 (2016-05-30)
Closed issues:
- Optional config settings are no longer optional?!? #29
- wtmp and btmp are different when using the future parser #13
Merged pull requests:
- Changed default string "undef" to "UNDEFINED" to work around this bug… #28 (durist)
- Fix typo in README.md #25 (siebrand)
- Added ability to override default btmp and/or wtmp #21 (ncsutmf)
- remove special whitespace character #20 (jfroche)
- Update Gemfile for Rake/Ruby version dependencies #19 (ncsutmf)
- add official puppet 4 support #17 (mmckinst)
v1.3.0 (2015-11-05)
Closed issues:
- The logrotate package should be 'present' by default, or at least tunable #11
Merged pull requests:
- Set default package ensure value to 'installed' #12 (natemccurdy)
- Add support for maxsize directive #10 (zeromind)
v1.2.8 (2015-09-14)
- Fix hidden unicode character (#8)
- Allow config to be passed in as an hash (#6)
- Fix dependency issue (#7)
- refactor main class (mostly to facilitate #7)
- update test environment to use puppet 4
- switch stdlib fixture to https source
v1.2.7 (2015-05-06)
- Metadata-only release (just bumped version)
v1.2.6 (2015-05-06)
- Fix test failures on future parser
v1.2.5 (2015-05-06)
- Switch some validation code to use validate_re
v1.2.4 (2015-05-06)
- Add puppet-lint exclusions
v1.2.3 (2015-05-06)
- More work on testing
- fix warning when running puppet module list caused by "-" instead of "/" in dependencies in metadata
v1.2.3 (2015-05-06)
- removed (pushed without CHANGELOG update
v1.2.1 (2015-05-06)
- Update tests, Rakefile, etc.
v1.2.0 (2015-03-25)
- First release to puppetforge
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.22.0 < 10.0.0)
- puppet/systemd (>= 6.3.0 < 8.0.0)
Copyright (c) 2012 Tim Sharpe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.