mellanox.onyx.onyx_syslog_files – Configure file management syslog module
Note
This plugin is part of the mellanox.onyx collection (version 1.0.0).
You might already have this collection installed if you are using the ansible
package.
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 mellanox.onyx
.
To use it in a playbook, specify: mellanox.onyx.onyx_syslog_files
.
New in version 0.2.0: of mellanox.onyx
Parameters
Parameter |
Comments |
---|---|
Configure settings for debug log files Choices:
|
|
Delete certain log files Choices:
|
|
rotation related attributes |
|
force an immediate rotation of log files Choices:
|
|
Rotate log files on a fixed time-based schedule Choices:
|
|
Sepcify max_num of old log files to keep |
|
Rotate files when they pass max size |
|
Rotatoe files when they pass percent of HD |
|
Upload compressed log file (current or filename) |
|
upload local log files to remote host (ftp, scp, sftp, tftp) with format protocol://username[:password]@server/path |
Examples
- name: Syslog delete old files
- onyx_syslog_files:
delete_group: oldest
- name: Syslog upload file
- onyx_syslog_files:
upload_url: scp://username:password@hostnamepath/filename
upload_file: current
- name: Syslog rotation force, frequency and max number
- onyx_syslog_files:
rotation:
force: true
max_num: 30
frequency: daily
size: 128
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The list of configuration mode commands to send to the device. Returned: always Sample: [“logging files delete current”, “logging files rotate criteria”, “logging files upload current url”] |
Authors
Anas Shami (@anass)