community.general.onyx_syslog_files (0.1.1) — module

Configure file management syslog module

Authors: Anas Shami (@anass)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: syslog delete old files
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- onyx_syslog_files:
    delete_group: oldest
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: syslog upload file
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- onyx_syslog_files:
    upload_url: scp://username:password@hostnamepath/filename
    upload_file: current
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: syslog rotation force, frequency and max number
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- onyx_syslog_files:
    rotation:
        force: true
        max_num: 30
        frequency: daily
        size: 128

Inputs

    
debug:
    default: false
    description:
    - Configure settings for debug log files
    type: bool

rotation:
    description:
    - rotation related attributes
    suboptions:
      force:
        description:
        - force an immediate rotation of log files
        type: bool
      frequency:
        choices:
        - daily
        - weekly
        - monthly
        description:
        - Rotate log files on a fixed time-based schedule
        type: str
      max_num:
        description:
        - Sepcify max_num of old log files to keep
        type: int
      size:
        description:
        - Rotate files when they pass max size
        type: float
      size_pct:
        description:
        - Rotatoe files when they pass percent of HD
        type: float
    type: dict

upload_url:
    description:
    - upload local log files to remote host (ftp, scp, sftp, tftp) with format protocol://username[:password]@server/path
    type: str

upload_file:
    description:
    - Upload compressed log file (current or filename)
    type: str

delete_group:
    choices:
    - current
    - oldest
    description:
    - Delete certain log files
    type: str

Outputs

commands:
  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
  type: list