vyos.vyos.vyos_logging module – Manage logging on network devices
Note
This module is part of the vyos.vyos collection (version 5.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 vyos.vyos
.
To use it in a playbook, specify: vyos.vyos.vyos_logging
.
New in vyos.vyos 1.0.0
DEPRECATED
- Removed in:
major 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 |
Comments |
---|---|
List of logging definitions. |
|
Destination of the logs. Choices:
|
|
Set logging facility. |
|
Set logging severity levels. |
|
If value of |
|
State of the logging configuration. Choices:
|
|
Destination of the logs. Choices:
|
|
Set logging facility. |
|
Set logging severity levels. |
|
If value of |
|
State of the logging configuration. Choices:
|
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 :ref:`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 |
Description |
---|---|
The list of configuration mode commands to send to the device Returned: always Sample: |
Status
This module will be removed in a major release after 2023-08-01. [deprecated]
For more information see DEPRECATED.