cisco / cisco.ios / 4.6.1 / module / ios_logging
Removed in None
Reason:Newer and updated modules released with more functionality. | Alternative:ios_logging_global
(deprecated, removed after 2023-06-01) Manage logging on network devices
| "added in version" 1.0.0 of cisco.ios"
Authors: Trishna Guha (@trishnaguha)
This plugin has a corresponding action plugin.
Install with ansible-galaxy collection install cisco.ios:==4.6.1
collections: - name: cisco.ios version: 4.6.1
This module provides declarative management of logging on Cisco Ios devices.
- name: Configure host logging cisco.ios.ios_logging: dest: host name: 172.16.0.1 state: present
- name: Remove host logging configuration cisco.ios.ios_logging: dest: host name: 172.16.0.1 state: absent
- name: Configure console logging level and facility cisco.ios.ios_logging: dest: console facility: local7 level: debugging state: present
- name: Enable logging to all cisco.ios.ios_logging: dest: on
- name: Configure buffer size cisco.ios.ios_logging: dest: buffered size: 5000
- name: Configure logging using aggregate cisco.ios.ios_logging: aggregate: - { dest: console, level: notifications } - { dest: buffered, size: 9000 }
- name: Remove logging using aggregate cisco.ios.ios_logging: aggregate: - { dest: console, level: notifications } - { dest: buffered, size: 9000 } state: absent
dest: choices: - 'on' - host - console - monitor - buffered - trap description: - Destination of the logs. - On dest has to be quoted as 'on' or else pyyaml will convert to True before it gets to Ansible. type: str name: description: - The hostname or IP address of the destination. - Required when I(dest=host). type: str size: description: - Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes. type: int level: choices: - emergencies - alerts - critical - errors - warnings - notifications - informational - debugging default: debugging description: - Set logging severity levels. type: str state: choices: - present - absent default: present description: - State of the logging configuration. type: str facility: description: - Set logging facility. type: str aggregate: description: List of logging definitions. elements: dict suboptions: dest: choices: - 'on' - host - console - monitor - buffered - trap description: - Destination of the logs. - On dest has to be quoted as 'on' or else pyyaml will convert to True before it gets to Ansible. type: str facility: description: - Set logging facility. type: str level: choices: - emergencies - alerts - critical - errors - warnings - notifications - informational - debugging description: - Set logging severity levels. type: str name: description: - The hostname or IP address of the destination. - Required when I(dest=host). type: str size: description: - Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes. type: int state: choices: - present - absent description: - State of the logging configuration. type: str type: list
commands: description: The list of configuration mode commands to send to the device returned: always sample: - logging facility local7 - logging host 172.16.0.1 type: list