Skip to content

Latest commit

 

History

History
470 lines (405 loc) · 21 KB

arista.eos.eos_interfaces.rst

File metadata and controls

470 lines (405 loc) · 21 KB
source:

arista.eos.eos_interfaces -- Manages interface attributes of Arista EOS interfaces

  • This module manages the interface attributes of Arista EOS interfaces.
Parameter Choices/Defaults Configuration Comments
config
list
The provided configuration
description
string
Interface description
duplex
string
Interface link status. Applicable for Ethernet interfaces only.
Values other than auto must also set speed.
Ignored when speed is set above 1000.
enabled
boolean
    Choices:
  • no
  • yes ←
Administrative state of the interface.
Set the value to true to administratively enable the interface or false to disable it.
mtu
integer
MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for Ethernet interfaces only.
name
string / required
Full name of the interface, e.g. GigabitEthernet1.
speed
string
Interface link speed. Applicable for Ethernet interfaces only.
state
string
    Choices:
  • merged ←
  • replaced
  • overridden
  • deleted
The state of the configuration after module completion.

Note

  • Tested against Arista EOS 4.20.10M
  • This module works with connection network_cli. See the EOS Platform Options.
---

# Using merged

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Merge provided configuration with device configuration
  eos_interfaces:
    config:
      - name: Ethernet1
        enabled: True
      - name: Ethernet2
        description: 'Configured by Ansible'
        enabled: False
    state: merged

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

# Using replaced

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Replaces device configuration of listed interfaces with provided configuration
  eos_interfaces:
    config:
      - name: Ethernet1
        enabled: True
      - name: Ethernet2
        description: 'Configured by Ansible'
        enabled: False
    state: replaced

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

# Using overridden

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Overrides all device configuration with provided configuration
  eos_interfaces:
    config:
      - name: Ethernet1
        enabled: True
      - name: Ethernet2
        description: 'Configured by Ansible'
        enabled: False
    state: overridden

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
#    description "Configured by Ansible"
#    shutdown
# !
# interface Management1
#    ip address dhcp
# !

# Using deleted

# Before state:
# -------------
#
# veos#show running-config | section interface
# interface Ethernet1
#    description "Interface 1"
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

- name: Delete or return interface parameters to default settings
  eos_interfaces:
    config:
      - name: Ethernet1
    state: deleted

# After state:
# ------------
#
# veos#show running-config | section interface
# interface Ethernet1
# !
# interface Ethernet2
# !
# interface Management1
#    description "Management interface"
#    ip address dhcp
# !

Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this :

Key Returned Description
after
dictionary
when changed
The configuration as structured data after module completion.

Sample:
The configuration returned will always be in the same format of the parameters above.
before
dictionary
always
The configuration as structured data prior to module invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['interface Ethernet2', 'shutdown', 'speed 10full']


Red Hat Support

More information about Red Hat's support of this is available from this Red Hat Knowledge Base article.

Authors

  • Nathaniel Case (@qalthos)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.