ansible / ansible.builtin / v2.4.2.0-1 / module / nxos_logging Manage logging on network devices | "added in version" 2.4 of ansible.builtin" Authors: Trishna Guha (@trishnag) preview | supported by networkansible.builtin.nxos_logging (v2.4.2.0-1) — module
pip
Install with pip install ansible==2.4.2.0.post1
This module provides declarative management of logging on Cisco NX-OS devices.
- name: configure console logging with level nxos_logging: dest: console level: 2 state: present
- name: remove console logging configuration nxos_logging: dest: console level: 2 state: absent
- name: configure file logging with level nxos_logging: dest: logfile name: testfile dest_level: 3 state: present
- name: configure facility level logging nxos_logging: facility: daemon facility_level: 0 state: present
- name: remove facility level logging nxos_logging: facility: daemon facility_level: 0 state: absent
dest: choices: - console - logfile - module - monitor description: - Destination of the logs. name: description: - If value of C(dest) is I(logfile) it indicates file-name. purge: default: false description: - Purge logging not defined in the aggregate parameter. state: choices: - present - absent default: present description: - State of the logging configuration. facility: description: - Facility name for logging. aggregate: description: List of logging definitions. dest_level: description: - Set logging severity levels. C(alias level). facility_level: description: - Set logging serverity levels for facility based log messages.
commands: description: The list of configuration mode commands to send to the device returned: always sample: - logging console 2 - logging logfile testfile 3 - logging level daemon 0 type: list