kowabunga.cloud.logrotate role – Install, configure, and start logrotate.

Note

This role is part of the kowabunga.cloud collection (version 0.0.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install kowabunga.cloud.

To use it in a playbook, specify: kowabunga.cloud.logrotate.

Entry point main – Install, configure, and start logrotate.

Synopsis

  • Install, configure, and start logrotate.

Parameters

Parameter

Comments

kowabunga_logrotate_count

integer

Defines how many times log files are rotated before being removed.

If count is 0, old versions are removed rather than rotated.

If count is -1, old logs are not removed at all, except they are affected by <max_age_days> variable.

Default: 7

kowabunga_logrotate_max_age_days

integer

Instruct logrotate to remove rotated log files older than <count> days.

The age is only checked if the logfile is to be rotated.

Default: 7

kowabunga_logrotate_max_file_size_gb

integer

Defines maximum log file size (in GB) before log rotation process if enforced.

Defaults to 10% of the root filesystem if unspecified (0).

Default: 0

kowabunga_logrotate_syslog_files_extra

list / elements=string

List of extra syslog-formatted files to be processed by log rotation mechanism.

Default: []

kowabunga_logrotate_timer_frequency

string

Defines timer frequency for log rotation, as to prevent filesystem’s exhaustion.

Choices:

  • "hourly"

  • "daily" ← (default)

  • "weekly"

  • "monthly"

  • "yearly"