puzzle.opnsense.system_settings_logging module – Configure logging settings.
Note
This module is part of the puzzle.opnsense collection (version 1.5.0).
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 puzzle.opnsense
.
To use it in a playbook, specify: puzzle.opnsense.system_settings_logging
.
New in puzzle.opnsense 1.0.0
Synopsis
Module to configure system logging
Parameters
Parameter |
Comments |
---|---|
Maximum file size per log file, e.g. When set and a logfile exceeds the amount specified, it will be rotated This option is available in OPNsense 24.1 and newer |
|
Number of logs to preserve. By default 31 logs are preserved. When no max filesize is offered or the logs are smaller than the the size requested, this equals the number of days, e.g. |
Examples
- name: Set the number of logs to preserve to 10
puzzle.opnsense.system_settings_logging:
preserve_logs: 10
- name: Set max log file size to 5MB
puzzle.opnsense.system_settings_logging:
max_log_file_size_mb: 5
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A List of the executed OPNsense configure function along with their respective stdout, stderr and rc Returned: always Sample: |