eos_interfaces – Manages interface attributes of Arista EOS interfaces¶
New in version 2.9.
Synopsis¶
This module manages the interface attributes of Arista EOS interfaces.
Parameters¶
Notes¶
Note
Tested against Arista EOS 4.20.10M
This module works with connection
network_cli
. See the EOS Platform Options.
Examples¶
---
# 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'
enable: 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
# !
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Network Team. [network]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.