Spec-Zone.ru › Ansible

Модуль cisco.ios.ios_evpn_evi – Модуль ресурсов для настройки L2VPN EVPN EVI.

Примечание

Этот модуль является частью коллекции cisco.ios (версия 8.0.0).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не включена в ansible-core. Чтобы проверить установку, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install cisco.ios.

Для использования в книге задач укажите: cisco.ios.ios_evpn_evi.

Новое в cisco.ios 5.3.0

  • Описание
  • Параметры
  • Примечания
  • Примеры
  • Значения возврата

Описание

  • Этот модуль предоставляет декларативное управление L2VPN EVPN EVI на устройствах Cisco IOS.

Псевдонимы: evpn_evi

Параметры

Параметр

Комментарии

config

список / элементы=словарь

Словарь конфигурации L2VPN Ethernet Virtual Private Network (EVPN) EVI

default_gateway

словарь

Параметры шлюза по умолчанию

advertise

словарь

Рекламировать маршруты шлюза по умолчанию MAC/IP

disable

логическое

Отключить рекламу маршрутов шлюза по умолчанию MAC/IP

Варианты:

  • false
  • true

enable

логическое

Включить рекламу маршрутов шлюза по умолчанию MAC/IP

Варианты:

  • false
  • true

encapsulation

строка

Тип инкапсуляции EVPN

Варианты:

  • "vxlan" ← (по умолчанию)

evi

целое число / обязательно

Значение инстанса EVPN

ip

словарь

Параметры IP

local_learning

словарь

Локальное обучение IP

disable

логическое

Отключить локальное обучение IP

Варианты:

  • false
  • true

enable

логическое

Включить локальное обучение IP

Варианты:

  • false
  • true

replication_type

строка

Метод репликации трафика BUM

Варианты:

  • "ingress"
  • "static"

route_distinguisher

строка

EVPN идентификатор маршрута

running_config

строка

Этот параметр используется только со state parsed.

Значение этого параметра должно соответствовать выводу устройства IOS после выполнения команды sh running-config nve | section ^l2vpn evpn$.

Состояние parsed считывает конфигурацию из параметра running_config и преобразует её в структурированные данные Ansible в соответствии с argspec модуля ресурсов, а затем значение возвращается в ключе parsed в результате.

state

строка

Состояние, в котором должна остаться конфигурация

Варианты:

  • "merged" ← (по умолчанию)
  • "replaced"
  • "overridden"
  • "deleted"
  • "gathered"
  • "rendered"
  • "parsed"

Примечания

Примечание

  • Тестировано на устройстве Cisco IOS-XE версии 17.13.01 на Cat9k в CML.
  • Этот модуль работает с соединением network_cli. См. https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html

Примеры

# Using state merged

# Before state:
# -------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type ingress

# - name: Merge provided configuration with device configuration
#   cisco.ios.ios_evpn_evi:
#     config:
#       - evi: 101
#         replication_type: ingress
#         route_distinguisher: '1:1'
#         default_gateway:
#           advertise:
#             enable: False
#         ip:
#           local_learning:
#             enable: True
#
#       - evi: 202
#         replication_type: static
#         default_gateway:
#           advertise:
#             enable: True
#         ip:
#           local_learning:
#             disable: True
#     state: merged

# Commands Fired:
# ---------------
# "commands": [
#     "l2vpn evpn instance 101 vlan-based",
#     "ip local-learning enable",
#     "replication-type ingress",
#     "rd 1:1",
#     "l2vpn evpn instance 202 vlan-based",
#     "default-gateway advertise enable",
#     "ip local-learning disable",
#     "replication-type static"
#     ],

# After state:
# ------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  rd 1:1
#  replication-type ingress
#  ip local-learning enable
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  ip local-learning disable
#  default-gateway advertise enable


# Using state replaced

# Before state:
# -------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  rd 1:1
#  replication-type ingress
#  ip local-learning enable
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  ip local-learning disable
#  default-gateway advertise enable

# - name: Replaces the device configuration with the provided configuration
#   cisco.ios.ios_evpn_evi:
#     config:
#       - evi: 101
#         replication_type: ingress
#         default_gateway:
#           advertise:
#             enable: True
#       - evi: 202
#         replication_type: ingress
#     state: replaced

# Commands Fired:
# ---------------
# "commands": [
#     "l2vpn evpn instance 101 vlan-based",
#     "default-gateway advertise enable",
#     "no ip local-learning enable",
#     "no rd 1:1",
#     "l2vpn evpn instance 202 vlan-based",
#     "no default-gateway advertise enable",
#     "no ip local-learning disable",
#     "replication-type ingress"
#     ],

# After state:
# ------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type ingress
#  default-gateway advertise enable
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type ingress

# Using state overridden

# Before state:
# -------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type ingress
#  default-gateway advertise enable
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type ingress

# - name: Override the device configuration with provided configuration
#   cisco.ios.ios_evpn_evi:
#     config:
#       - evi: 101
#         replication_type: ingress
#         default_gateway:
#           advertise:
#             enable: True
#       - evi: 202
#         replication_type: static
#         default_gateway:
#           advertise:
#             enable: True
#     state: overridden

# Commands Fired:
# ---------------
# "commands": [
#     "no l2vpn evpn instance 102 vlan-based",
#     "no l2vpn evpn instance 201 vlan-based",
#     "l2vpn evpn instance 202 vlan-based",
#     "default-gateway advertise enable",
#     "replication-type static"
#     ],

# After state:
# ------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type ingress
#  default-gateway advertise enable
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  default-gateway advertise enable


# Using state Deleted

# Before state:
# -------------
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type ingress
#  default-gateway advertise enable
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  default-gateway advertise enable

# - name: "Delete the given EVI(s)"
#   cisco.ios.ios_evpn_evi:
#     config:
#       - evi: 101
#     state: deleted

# Commands Fired:
# ---------------
# "commands": [
#       "no l2vpn evpn instance 101 vlan-based"
#       ],

# After state:
# -------------
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  default-gateway advertise enable

# Using state Deleted without any config passed

# Before state:
# -------------
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type static
#  default-gateway advertise enable

# - name: "Delete ALL EVIs"
#   cisco.ios.ios_evpn_evi:
#     state: deleted

# Commands Fired:
# ---------------
# "commands": [
#     "no l2vpn evpn instance 102 vlan-based",
#     "no l2vpn evpn instance 202 vlan-based"
#     ],

# After state:
# -------------
# !

# Using gathered

# Before state:
# -------------
#
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !
# l2vpn evpn instance 201 vlan-based
#  encapsulation vxlan
#  replication-type static
# !
# l2vpn evpn instance 202 vlan-based
#  encapsulation vxlan
#  replication-type ingress

# - name: Gather facts for evpn_evi
#   cisco.ios.ios_evpn_evi:
#     config:
#     state: gathered

# Task Output:
# ------------
#
# gathered:
#   - evi: 101
#     encapsulation: vxlan
#     replication_type: static
#   - evi: 102
#     encapsulation: vxlan
#     replication_type: ingress
#   - evi: 201
#     encapsulation: vxlan
#     replication_type: static
#   - evi: 202
#     encapsulation: vxlan
#     replication_type: ingress

# Using Rendered

# - name: Rendered the provided configuration with the existing running configuration
#   cisco.ios.ios_evpn_evi:
#     config:
#       - evi: 101
#         replication_type: ingress
#         default_gateway:
#           advertise:
#             enable: True
#       - evi: 202
#         replication_type: ingress
#     state: rendered

# Task Output:
# ------------
#
# rendered:
# - l2vpn evpn instance 101 vlan-based
# - default-gateway advertise enable
# - replication-type ingress
# - l2vpn evpn instance 202 vlan-based
# - replication-type ingress


# Using parsed

# File: parsed.cfg
# ----------------
#
# l2vpn evpn instance 101 vlan-based
#  encapsulation vxlan
#  replication-type ingress
#  default-gateway advertise enable
# !
# l2vpn evpn instance 102 vlan-based
#  encapsulation vxlan
#  replication-type ingress
# !

# - name: Parse the commands for provided configuration
#   cisco.ios.ios_evpn_evi:
#     running_config: "{{ lookup('file', 'parsed.cfg') }}"
#     state: parsed

# Task Output:
# ------------
#
# parsed:
#   - evi: 101
#     encapsulation: vxlan
#     replication_type: ingress
#     default_gateway:
#       advertise:
#         enable: true
#   - evi: 102
#     encapsulation: vxlan
#     replication_type: ingress
END_OF_DOCUMENT_MARKER

Значения возврата

Общие значения возврата документированы здесь, следующие поля уникальны для данного модуля:

Ключ

Описание

after

словарь

Результат конфигурации после выполнения модуля.

Возвращается: при изменении

Пример: "This output will always be in the same format as the module argspec.\n"

before

словарь

Конфигурация до выполнения модуля.

Возвращается: когда state равен merged, replaced, overridden, deleted или purged

Пример: "This output will always be in the same format as the module argspec.\n"

commands

список / элементы=строка

Набор команд, отправленных на удалённое устройство.

Возвращается: когда state равен merged, replaced, overridden, deleted или purged

Пример: ["l2vpn evpn instance 101 vlan-based", "encapsulation vxlan", "replication-type ingress"]

Авторы

  • Padmini Priyadarshini Sivaraj (@PadminiSivaraj)

Ссылки на коллекцию

  • Система отслеживания ошибок
  • Репозиторий (источники)

© 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/cisco/ios/ios_evpn_evi_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API