Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 2.67 KB

README.md

File metadata and controls

49 lines (38 loc) · 2.67 KB

noobient.logrotate

Synopsys

This role enables log rotation for log files. Rotation occurs daily, and the files are compressed using the XZ compression.

Parameters

Name Required Example Description
name yes tomcat Nickname of the log rotation configuration.
pattern yes /var/log/foo.log Pattern(s) for the file(s) to rotate. You can specify multiple patterns, one line per pattern, see examples for syntax.
retention no 14 Number of days to keep the rotated log files. Defaults to 7.

Examples

- include_role:
    name: noobient.logrotate
  vars:
    name: kf2-ddos
    pattern: /var/log/kf2-ddos.log

- include_role:
    name: noobient.logrotate
  vars:
    name: tomcat
    pattern: |-
      /opt/tomcat/logs/*.log
      /opt/tomcat/logs/catalina.out
    retention: 14

Return Values

N/A

Support

Platform Support Status
Linter Lint
AlmaLinux 8 AlmaLinux 8
AlmaLinux 9 AlmaLinux 9
Fedora 40 Fedora 40
Fedora 41 Fedora 41
Ubuntu 20.04 Ubuntu 20.04
Ubuntu 22.04 Ubuntu 22.04
Ubuntu 24.04 Ubuntu 24.04