cisco.iosxr.iosxr_logging module – (deprecated, removed after 2023-08-01) Configuration management of system logging services on network devices
Note
This module is part of the cisco.iosxr collection (version 4.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cisco.iosxr
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.iosxr.iosxr_logging
.
New in cisco.iosxr 1.0.0
DEPRECATED
- Removed in
major release after 2023-08-01
- Why
Updated module released with more functionality.
- Alternative
iosxr_logging_global
Synopsis
This module provides declarative management configuration of system logging (syslog) on Cisco IOS XR devices.
Requirements
The below requirements are needed on the host that executes this module.
ncclient >= 0.5.3 when using netconf
lxml >= 4.1.1 when using netconf
Parameters
Parameter |
Comments |
---|---|
List of syslog logging configuration definitions. |
|
Destination for system logging (syslog) messages. Choices:
|
|
To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for |
|
To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for |
|
Specifies the severity level for the logging. Choices:
|
|
When When |
|
Set file path. |
|
Size of buffer when Size of file when |
|
Existential state of the logging configuration on the node. Choices:
|
|
vrf name when syslog server is configured, |
|
Destination for system logging (syslog) messages. Choices:
|
|
To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for Default: |
|
To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for |
|
Specifies the severity level for the logging. Choices:
|
|
When When |
|
Set file path. |
|
Size of buffer when Size of file when |
|
Existential state of the logging configuration on the node. Choices:
|
|
vrf name when syslog server is configured, Default: |
Notes
Note
This module works with connection
network_cli
andnetconf
. See the IOS-XR Platform Options.For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
Examples
- name: configure logging for syslog server host
cisco.iosxr.iosxr_logging:
dest: host
name: 10.10.10.1
level: critical
state: present
- name: add hostnameprefix configuration
cisco.iosxr.iosxr_logging:
hostnameprefix: host1
state: absent
- name: add facility configuration
cisco.iosxr.iosxr_logging:
facility: local1
state: present
- name: configure console logging level
cisco.iosxr.iosxr_logging:
dest: console
level: debugging
state: present
- name: configure monitor logging level
cisco.iosxr.iosxr_logging:
dest: monitor
level: errors
state: present
- name: configure syslog to a file
cisco.iosxr.iosxr_logging:
dest: file
name: file_name
size: 2048
level: errors
state: present
- name: configure buffered logging with size
cisco.iosxr.iosxr_logging:
dest: buffered
size: 5100000
- name: Configure logging using aggregate
cisco.iosxr.iosxr_logging:
aggregate:
- {dest: console, level: warning}
- {dest: buffered, size: 4800000}
- {dest: file, name: file3, size: 2048}
- {dest: host, name: host3, level: critical}
- name: Delete logging using aggregate
cisco.iosxr.iosxr_logging:
aggregate:
- {dest: console, level: warning}
- {dest: buffered, size: 4800000}
- {dest: file, name: file3, size: 2048}
- {dest: host, name: host3, level: critical}
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The list of configuration mode commands to send to the device Returned: always (empty list when no commands to send) Sample: |
|
NetConf rpc xml sent to device with transport Returned: always (empty list when no xml rpc to send) Sample: |
Status
This module will be removed in a major release after 2023-08-01. [deprecated]
For more information see DEPRECATED.