arillso.system.logrotate role – Cross-platform log rotation management

Note

This role is part of the arillso.system collection (version 0.0.34).

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 arillso.system.

To use it in a playbook, specify: arillso.system.logrotate.

Entry point main – Cross-platform log rotation management

Synopsis

  • This role manages log rotation on both Linux and Windows systems.

  • It configures log rotation frequency, retention, compression, and ownership.

Parameters

Parameter

Comments

logrotate_compress

boolean

Determines whether rotated logs should be compressed.

Choices:

  • false

  • true ← (default)

logrotate_dateext

boolean

Determines whether to append a date extension to the rotated log files.

Choices:

  • false

  • true

logrotate_entries

list / elements=dictionary

A list to define specific log rotation configurations.

logrotate_frequency

string

Defines how often logs should be rotated. Options are ‘daily’, ‘weekly’, or ‘monthly’.

Default: "weekly"

logrotate_group

string

Defines the group that will own the rotated log files, loaded from OS-specific variables or set manually.

logrotate_keep

integer

Specifies the number of rotated log files to keep.

Default: 4

logrotate_user

string

Defines the user who will own the rotated log files, loaded from OS-specific variables or set manually.