mellanox.onyx.onyx_syslog_files module – Configure file management syslog module

Note

This module 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

Synopsis

  • This module provides declarative management of syslog on Mellanox ONYX network devices.

Parameters

Parameter

Comments

debug

boolean

Configure settings for debug log files

Choices:

  • no ← (default)

  • yes

delete_group

string

Delete certain log files

Choices:

  • current

  • oldest

rotation

dictionary

rotation related attributes

force

boolean

force an immediate rotation of log files

Choices:

  • no

  • yes

frequency

string

Rotate log files on a fixed time-based schedule

Choices:

  • daily

  • weekly

  • monthly

max_num

integer

Sepcify max_num of old log files to keep

size

float

Rotate files when they pass max size

size_pct

float

Rotatoe files when they pass percent of HD

upload_file

string

Upload compressed log file (current or filename)

upload_url

string

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

commands

list / elements=string

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)