Skip to content

Latest commit

 

History

History
335 lines (294 loc) · 11.8 KB

vyos.vyos.vyos_logging_module.rst

File metadata and controls

335 lines (294 loc) · 11.8 KB

vyos.vyos.vyos_logging

Manage logging on network devices

Version added: 1.0.0

DEPRECATED

:Removed in collection release after 2023-08-01 :Why: Updated module released with more functionality. :Alternative: vyos_logging_global

Synopsis

  • This module provides declarative management of logging on Vyatta Vyos devices.

Parameters

Parameter Choices/Defaults Comments
aggregate
list / elements=dictionary
List of logging definitions.
dest
string
    Choices:
  • console
  • file
  • global
  • host
  • user
Destination of the logs.
facility
string
Set logging facility.
level
string
Set logging severity levels.
name
string
If value of dest is file it indicates file-name, for user it indicates username and for host indicates the host name to be notified.
state
string
    Choices:
  • present
  • absent
State of the logging configuration.
dest
string
    Choices:
  • console
  • file
  • global
  • host
  • user
Destination of the logs.
facility
string
Set logging facility.
level
string
Set logging severity levels.
name
string
If value of dest is file it indicates file-name, for user it indicates username and for host indicates the host name to be notified.
state
string
    Choices:
  • present ←
  • absent
State of the logging configuration.

Notes

Note

- Tested against VyOS 1.1.8 (helium). - This module works with connection ansible.netcommon.network_cli. See the VyOS OS Platform Options. - For more information on using Ansible to manage network devices see the Ansible Network Guide <network_guide>

Examples

- name: configure console logging
  vyos.vyos.vyos_logging:
    dest: console
    facility: all
    level: crit

- name: remove console logging configuration
  vyos.vyos.vyos_logging:
    dest: console
    state: absent

- name: configure file logging
  vyos.vyos.vyos_logging:
    dest: file
    name: test
    facility: local3
    level: err

- name: Add logging aggregate
  vyos.vyos.vyos_logging:
    aggregate:
    - {dest: file, name: test1, facility: all, level: info}
    - {dest: file, name: test2, facility: news, level: debug}
    state: present

- name: Remove logging aggregate
  vyos.vyos.vyos_logging:
    aggregate:
    - {dest: console, facility: all, level: info}
    - {dest: console, facility: daemon, level: warning}
    - {dest: file, name: test2, facility: news, level: debug}
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list
always
The list of configuration mode commands to send to the device

Sample:
['set system syslog global facility all level notice']


Status

  • This module will be removed in a release after 2023-08-01. [deprecated]
  • For more information see DEPRECATED.

Authors

  • Trishna Guha (@trishnaguha)