Модуль arista.eos.eos_lacp_interfaces – Ресурсный модуль интерфейсов LACP
Примечание
Этот модуль является частью коллекции arista.eos (версия 9.0.0).
Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не включена в ansible-core. Чтобы проверить установку, выполните ansible-galaxy collection list.
Для установки используйте: ansible-galaxy collection install arista.eos.
Чтобы использовать его в книге задач, укажите: arista.eos.eos_lacp_interfaces.
Новое в arista.eos 1.0.0
Обзор
- Этот модуль управляет атрибутами протокола Link Aggregation Control Protocol (LACP) интерфейсов на устройствах Arista EOS.
Псевдонимы: lacp_interfaces
Параметры
Параметр | Комментарии |
|---|---|
config список / элементы=словарь | Словарь параметров интерфейсов LACP. |
|
name строка |
Полное имя интерфейса (например, Ethernet1). |
|
port_priority целое число |
Приоритет порта LACP для интерфейса. Диапазон 1-65535. |
|
timer псевдонимы: rate строка |
Скорость отправки PDU протоколом LACP. При высокой скорости LACP передается один раз в секунду. При нормальной скорости LACP передается через 30 секунд после объединения канала. Выбор:
|
running_config строка | Этот параметр используется только со значением parsed. Значение этого параметра должно быть результатом выполнения команды show running-config | section ^interfaces на устройстве EOS. Состояние parsed считывает конфигурацию из параметра |
state строка | Состояние конфигурации после завершения модуля. Выбор:
|
Примечания
Примечание
- Проверено на Arista EOS 4.24.6F
- Этот модуль работает с подключением
network_cli. Смотрите Параметры платформы EOS.
Примеры
# Using merged
#
#
# ------------
# Before state
# ------------
#
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# interface Ethernet2
# lacp rate fast
- name: Merge provided configuration with device configuration
arista.eos.eos_lacp_interfaces:
config:
- name: Ethernet1
rate: fast
- name: Ethernet2
rate: normal
state: merged
#
# -----------
# After state
# -----------
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# lacp rate fast
# interface Ethernet2
# Using replaced
#
#
# ------------
# Before state
# ------------
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# interface Ethernet2
# lacp rate fast
- name: Replace existing LACP configuration of specified interfaces with provided
configuration
arista.eos.eos_lacp_interfaces:
config:
- name: Ethernet1
rate: fast
state: replaced
#
# -----------
# After state
# -----------
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp rate fast
# interface Ethernet2
# lacp rate fast
# Using overridden
#
#
# ------------
# Before state
# ------------
#
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# interface Ethernet2
# lacp rate fast
- name: Override the LACP configuration of all the interfaces with provided configuration
arista.eos.eos_lacp_interfaces:
config:
- name: Ethernet1
rate: fast
state: overridden
#
# -----------
# After state
#
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp rate fast
# interface Ethernet2
# Using deleted
#
#
# ------------
# Before state
# ------------
#
#
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# interface Ethernet2
# lacp rate fast
- name: Delete LACP attributes of given interfaces (or all interfaces if none specified).
arista.eos.eos_lacp_interfaces:
state: deleted
#
# -----------
# After state
# -----------
#
# veos#show run | section ^interface
# interface Ethernet1
# interface Ethernet2
# using rendered:
- name: Use Rendered to convert the structured data to native config
arista.eos.eos_lacp_interfaces:
config:
- name: Ethernet1
rate: fast
- name: Ethernet2
rate: normal
state: rendered
#
# -----------
# Output
# -----------
# rendered:
# - "interface Ethernet1"
# - "lacp rate fast"
# Using parsed:
# parsed.cfg:
# "interface Ethernet1"
# "lacp rate fast"
# "interface Ethernet2"
- name: Use parsed to convert native configs to structured data
arista.eos.eos_lacp_interfaces:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Output:
# parsed:
# - name: Ethernet1
# rate: fast
# - name: Ethernet2
# rate: normal
# Using gathered:
# native config:
# veos#show run | section ^interface
# interface Ethernet1
# lacp port-priority 30
# interface Ethernet2
# lacp rate fast
- name: Gather LACP facts from the device
arista.eos.eos_lacp_interfaces:
state: gathered
# Output:
# gathered:
# - name: Ethernet1
# - name: Ethernet2
# rate: fast
Возвращаемые значения
Общие возвращаемые значения описаны здесь, следующие поля уникальны для этого модуля:
Ключ | Описание |
|---|---|
after список / элементы=строка | Конфигурация в структурированном формате после завершения модуля. Возвращается: при изменении Пример: |
before список / элементы=строка | Конфигурация в структурированном формате до вызова модуля. Возвращается: всегда Пример: |
commands список / элементы=строка | Набор команд, отправленных на удаленное устройство. Возвращается: всегда Пример: |
Ссылки на коллекцию
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/arista/eos/eos_lacp_interfaces_module.html