source: |
---|
- This module manages the interface attributes of Arista EOS interfaces.
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 :
- This is not guaranteed to have a backwards compatible interface. [preview]
- This is :ref:`maintained by the Ansible Network Team <modules_support>`. [network]
More information about Red Hat's support of this is available from this Red Hat Knowledge Base article.
- 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.