Manage logging on network devices
Version added: 1.0.0
:Removed in collection release after 2023-08-01 :Why: Updated module released with more functionality. :Alternative: vyos_logging_global
- This module provides declarative management of logging on Vyatta Vyos devices.
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>`
- 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
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']
|
- This module will be removed in a release after 2023-08-01. [deprecated]
- For more information see DEPRECATED.
- Trishna Guha (@trishnaguha)