.. _cisco.ios.ios_interfaces_module:
************************
cisco.ios.ios_interfaces
************************
**Resource module to configure interfaces.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module manages the interface attributes of Cisco IOS network devices.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
A dictionary of interface options
|
|
description
string
|
|
Interface description.
|
|
duplex
string
|
|
Interface link status. Applicable for Ethernet interfaces only, either in half duplex, full duplex or in automatic state which negotiates the duplex automatically.
|
|
enabled
boolean
|
|
Administrative state of the interface.
Set the value to true to administratively enable the interface or false to disable it.
|
|
logging
dictionary
|
|
Logging interface events
|
|
|
bundle_status
boolean
|
|
BUNDLE/UNBUNDLE messages
|
|
|
link_status
boolean
|
|
UPDOWN and CHANGE messages
|
|
|
nfas_status
boolean
|
|
NFAS D-channel status messages
|
|
|
spanning_tree
boolean
|
|
Spanning-tree Interface events
|
|
|
status
boolean
|
|
Spanning-tree state change messages
|
|
|
subif_link_status
boolean
|
|
Sub-interface UPDOWN and CHANGE messages
|
|
|
trunk_status
boolean
|
|
TRUNK status messages
|
|
mac_address
string
|
|
H.H.H MAC address.
|
|
mode
string
|
|
Manage Layer2 or Layer3 state of the interface.
For a Layer 2 appliance mode Layer2 adds switchport command ( default impacts idempotency).
For a Layer 2 appliance mode Layer3 adds no switchport command.
For a Layer 3 appliance mode Layer3/2 has no impact rather command fails on apply.
|
|
mtu
integer
|
|
MTU for a specific interface. Applicable for Ethernet interfaces only.
Refer to vendor documentation for valid values.
|
|
name
string
/ required
|
|
Full name of interface, e.g. GigabitEthernet0/2, loopback999.
|
|
service_policy
dictionary
|
|
Service policy configuration
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
|
type_options
dictionary
|
|
Configure CPL Service Policy
|
|
|
|
access_control
dictionary
|
|
access-control specific policy-map
|
|
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
|
|
epbr
dictionary
|
|
Configure ePBR Service Policy
|
|
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
|
|
nwpi
dictionary
|
|
Configure Network Wide Path Insight Service Policy
|
|
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
|
|
packet_service
dictionary
|
|
Configure Packet-Service Service Policy
|
|
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
|
|
service_chain
dictionary
|
|
Configure Service-chain Service Policy
|
|
|
|
|
input
string
|
|
Assign policy-map to the input of an interface
|
|
|
|
|
output
string
|
|
Assign policy-map to the output of an interface
|
|
snmp
dictionary
|
|
snmp trap configurations
|
|
|
ifindex
dictionary
|
|
Persist ifindex for the interface
|
|
|
|
clear
boolean
|
|
Clear Enable/Disable ifIndex persistence
|
|
|
|
persist
boolean
|
|
Enable/Disable ifIndex persistence
|
|
|
trap
dictionary
|
|
Allow a specific SNMP trap
|
|
|
|
ip
boolean
|
|
internet protocol (snmp trap ip verify drop-rate)
|
|
|
|
link_status
boolean
|
|
Allow SNMP LINKUP and LINKDOWN traps (snmp trap link-status permit duplicates)
|
|
|
|
mac_notification_added
boolean
|
|
MAC Address notification for the interface (snmp trap mac-notification change added)
|
|
|
|
mac_notification_removed
boolean
|
|
MAC Address notification for the interface (snmp trap mac-notification change removed)
|
|
speed
string
|
|
Interface link speed. Applicable for Ethernet interfaces only.
|
|
template
string
|
|
IOS template name.
|
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the IOS device by executing the command show running-config | section ^interface.
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- rendered
- gathered
- purged
- parsed
|
The state the configuration should be left in
The states rendered, gathered and parsed does not perform any change on the device.
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result.
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config | include ip route|ipv6 route executed on device. For state parsed active connection to remote host is not required.
The state purged negates virtual/logical interfaces that are specified in task from running-config.
|