.. _ansible.netcommon.net_interface_module: ******************************* ansible.netcommon.net_interface ******************************* **(deprecated, removed after 2022-06-01) Manage Interface on network devices** Version added: 1.0.0 .. contents:: :local: :depth: 1 DEPRECATED ---------- :Removed in collection release after 2022-06-01 :Why: Updated modules released with more functionality :Alternative: Use platform-specific "[netos]_interfaces" module Synopsis -------- - This module provides declarative management of Interfaces on network devices. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
aggregate
-
List of Interfaces definitions.
delay
-
Default:
10
Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are state with values up/down, tx_rate and rx_rate.
description
-
Description of Interface.
duplex
-
    Choices:
  • full
  • half
  • auto ←
Interface link status
enabled
-
Configure interface link status.
mtu
-
Maximum size of transmit packet.
name
- / required
Name of the Interface.
purge
-
Default:
"no"
Purge Interfaces not defined in the aggregate parameter. This applies only for logical interface.
rx_rate
-
Receiver rate in bits per second (bps).
This is state check parameter only.
Supports conditionals, see Conditionals in Networking Modules
speed
-
Interface link speed.
state
-
    Choices:
  • present ←
  • absent
  • up
  • down
State of the Interface configuration, up indicates present and operationally up and down indicates present and operationally down
tx_rate
-
Transmit rate in bits per second (bps).
This is state check parameter only.
Supports conditionals, see Conditionals in Networking Modules

Notes ----- .. note:: - This module is supported on ``ansible_network_os`` network platforms. See the :ref:`Network Platform Options ` for details. Examples -------- .. code-block:: yaml - name: configure interface ansible.netcommon.net_interface: name: ge-0/0/1 description: test-interface - name: remove interface ansible.netcommon.net_interface: name: ge-0/0/1 state: absent - name: make interface up ansible.netcommon.net_interface: name: ge-0/0/1 description: test-interface enabled: true - name: make interface down ansible.netcommon.net_interface: name: ge-0/0/1 description: test-interface enabled: false - name: Create interface using aggregate ansible.netcommon.net_interface: aggregate: - {name: ge-0/0/1, description: test-interface-1} - {name: ge-0/0/2, description: test-interface-2} speed: 1g duplex: full mtu: 512 - name: Delete interface using aggregate ansible.netcommon.net_interface: aggregate: - {name: ge-0/0/1} - {name: ge-0/0/2} state: absent - name: Check intent arguments ansible.netcommon.net_interface: name: fxp0 state: up tx_rate: ge(0) rx_rate: le(0) - name: Config + intent ansible.netcommon.net_interface: name: fxp0 enabled: false state: down Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
commands
list
always, except for the platforms that use Netconf transport to manage the device.
The list of configuration mode commands to send to the device.

Sample:
['interface 20', 'name test-interface']


Status ------ - This module will be removed in a release after 2022-06-01. *[deprecated]* - For more information see `DEPRECATED`_. Authors ~~~~~~~ - Ganesh Nalawade (@ganeshrn)