On this page
nxos_logging - Manage logging on network devices
New in version 2.4.
Synopsis
- This module provides declarative management of logging on Cisco NX-OS devices.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
aggregate |
no |
List of logging definitions.
|
||
dest |
no |
|
Destination of the logs.
|
|
dest_level |
no |
Set logging severity levels. alias level .
|
||
facility |
no |
Facility name for logging.
|
||
facility_level |
no |
Set logging serverity levels for facility based log messages.
|
||
name |
no |
If value of dest is logfile it indicates file-name.
|
||
purge |
no |
Purge logging not defined in the aggregate parameter.
|
||
state |
no | present |
|
State of the logging configuration.
|
Examples
- 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
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
commands |
The list of configuration mode commands to send to the device
|
always | list | ['logging console 2', 'logging logfile testfile 3', 'logging level daemon 0'] |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance Info
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/nxos_logging_module.html