iosxr_logging - Manage logging on network devices
New in version 2.4.
Synopsis
- This module provides declarative management of logging on Cisco IOS XR devices.
Options
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| aggregate | no | List of logging definitions. | ||
| dest | no |
| Destination of the logs. | |
| facility | no | local7 | Set logging facility. | |
| level | no | debugging | Set logging severity levels. | |
| name | no | If value of dest is file it indicates file-name, for user it indicates username and for host indicates the host name to be notified. | ||
| size | no | 307200 | Size of buffer. The acceptable value is in range from 307200 to 125000000 bytes. | |
| state | no | present |
| State of the logging configuration. |
Examples
- name: configure hostnameprefix logging
iosxr_logging:
dest: hostnameprefix
name: 172.16.0.1
state: present
- name: remove hostnameprefix logging configuration
iosxr_logging:
dest: hostnameprefix
name: 172.16.0.1
state: absent
- name: configure console logging level and facility
iosxr_logging:
dest: console
facility: local7
level: debugging
state: present
- name: enable logging to all
iosxr_logging:
dest : on
- name: configure buffer size
iosxr_logging:
dest: buffered
size: 5000
- name: Configure logging using aggregate
iosxr_logging:
aggregate:
- { dest: console, level: warning }
- { dest: buffered, size: 4800000 }
- name: Delete logging using aggregate
iosxr_logging:
aggregate:
- { dest: console, level: warning }
- { dest: buffered, size: 4800000 }
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 facility local7', 'logging hostnameprefix 172.16.0.1'] |
Notes
Note
- Tested against IOS XR 6.1.2
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/iosxr_logging_module.html