You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation .
ios_logging - Manage logging on network devices
This module provides declarative management of logging on Cisco Ios devices.
parameter
required
default
choices
comments
aggregate
no
List of logging definitions.
dest
no
on host console monitor buffered
Destination of the logs.
facility
no
Set logging facility.
level
no
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
4096
Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes.
state
no
present
State of the logging configuration.
- name : configure host logging
ios_logging :
dest : host
name : 172.16.0.1
state : present
- name : remove host logging configuration
ios_logging :
dest : host
name : 172.16.0.1
state : absent
- name : configure console logging level and facility
ios_logging :
dest : console
facility : local7
level : debugging
state : present
- name : enable logging to all
ios_logging :
dest : on
- name : configure buffer size
ios_logging :
dest : buffered
size : 5000
- name : Configure logging using aggregate
ios_logging :
aggregate :
- { dest : console , level : notifications }
- { dest : buffered , size : 9000 }
- name : remove logging using aggregate
ios_logging :
aggregate :
- { dest : console , level : notifications }
- { dest : buffered , size : 9000 }
state : absent
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 host 172.16.0.1']
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
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 .
Copyright © 2017 Red Hat, Inc.
Last updated on Nov 15, 2022.
Ansible docs are generated from GitHub sources using Sphinx using a theme provided by Read the Docs . . Module documentation is not edited directly, but is generated from the source code for the modules. To submit an update to module docs, edit the 'DOCUMENTATION' metadata in the modules directory of the core source code repository .