ansible / ansible.builtin / v2.9.27 / module / cnos_logging Manage logging on network devices | "added in version" 2.8 of ansible.builtin" Authors: Anil Kumar Muraleedharan (@amuraleedhar) preview | supported by communityansible.builtin.cnos_logging (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
This module provides declarative management of logging on Cisco Cnos devices.
- name: configure server logging cnos_logging: dest: server name: 10.241.107.224 facility: local7 state: present
- name: remove server logging configuration cnos_logging: dest: server name: 10.241.107.224 state: absent
- name: configure console logging level and facility cnos_logging: dest: console level: 7 state: present
- name: configure buffer size cnos_logging: dest: logfile level: 5 name: testfile size: 5000
- name: Configure logging using aggregate cnos_logging: aggregate: - { dest: console, level: 6 } - { dest: logfile, size: 9000 }
- name: remove logging using aggregate cnos_logging: aggregate: - { dest: console, level: 6 } - { dest: logfile, name: anil, size: 9000 } state: absent
dest: choices: - server - console - monitor - logfile description: - Destination of the logs. Lenovo uses the term server instead of host in its CLI. name: description: - If value of C(dest) is I(file) it indicates file-name and for I(server) indicates the server name to be notified. size: default: 10485760 description: - Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes. level: default: 5 description: - Set logging severity levels. 0-emerg;1-alert;2-crit;3-err;4-warn; 5-notif;6-inform;7-debug state: choices: - present - absent default: present description: - State of the logging configuration. facility: description: - Set logging facility. This is applicable only for server logging aggregate: description: List of logging definitions.
commands: description: The list of configuration mode commands to send to the device returned: always sample: - logging console 7 - logging server 10.241.107.224 type: list