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

Synopsis

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

Parameters

Parameter Choices/Defaults Comments
debug
boolean
    Choices:
  • no
  • yes
Configure settings for debug log files
delete_group
string
    Choices:
  • current
  • oldest
Delete certain log files
rotation
dictionary
rotation related attributes
force
boolean
    Choices:
  • no
  • yes
force an immediate rotation of log files
frequency
string
    Choices:
  • daily
  • weekly
  • monthly
Rotate log files on a fixed time-based schedule
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 Returned Description
commands
list / elements=string
always
The list of configuration mode commands to send to the device.

Sample:
['logging files delete current', 'logging files rotate criteria', 'logging files upload current url']


Authors

  • Anas Shami (@anass)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/mellanox/onyx/onyx_syslog_files_module.html