ansible / ansible.netcommon / 3.1.3 / module / net_logging
Removed in None
Reason:Updated modules released with more functionality | Alternative:Use platform-specific "[netos]_logging" module
(deprecated, removed after 2022-06-01) Manage logging on network devices
| "added in version" 1.0.0 of ansible.netcommon"
Authors: Ganesh Nalawade (@ganeshrn)
This plugin has a corresponding action plugin.
Install with ansible-galaxy collection install ansible.netcommon:==3.1.3
collections: - name: ansible.netcommon version: 3.1.3
This module provides declarative management of logging on network devices.
- name: configure console logging ansible.netcommon.net_logging: dest: console facility: any level: critical
- name: remove console logging configuration ansible.netcommon.net_logging: dest: console state: absent
- name: configure host logging ansible.netcommon.net_logging: dest: host name: 192.0.2.1 facility: kernel level: critical
- name: Configure file logging using aggregate ansible.netcommon.net_logging: dest: file aggregate: - name: test-1 facility: pfe level: critical - name: test-2 facility: kernel level: emergency
- name: Delete file logging using aggregate ansible.netcommon.net_logging: dest: file aggregate: - name: test-1 facility: pfe level: critical - name: test-2 facility: kernel level: emergency state: absent
dest: choices: - console - host description: - Destination of the logs. name: description: - If value of C(dest) is I(host) it indicates file-name the host name to be notified. level: description: - Set logging severity levels. purge: default: false description: - Purge logging not defined in the I(aggregate) parameter. state: choices: - present - absent default: present description: - State of the logging configuration. facility: description: - Set logging facility. aggregate: description: List of logging definitions.
commands: description: The list of configuration mode commands to send to the device returned: always, except for the platforms that use Netconf transport to manage the device. sample: - logging console critical type: list