Модуль cisco.nxos.nxos_ospf_interfaces — модуль ресурсов интерфейсов OSPF.
Примечание
Этот модуль входит в коллекцию cisco.nxos (версия 11.2.0).
Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не входит в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.
Для установки используйте: ansible-galaxy collection install cisco.nxos.
Чтобы использовать её в плейбуке, укажите: cisco.nxos.nxos_ospf_interfaces.
Добавлено в cisco.nxos 1.3.0
Краткое описание
- Этот модуль управляет конфигурацией OSPF(v2/v3) интерфейсов на устройствах под управлением Cisco NX-OS.
Примечание
Для этого модуля существует соответствующий модуль действий.
Псевдонимы: ospf_interfaces
Параметры
Параметр | Комментарии |
|---|---|
config list / elements=dictionary | Список конфигураций OSPF для интерфейсов. |
|
address_family list / elements=dictionary |
Параметры OSPF для интерфейсов в контексте семейства адресов. |
|
afi string / обязательный |
Идентификатор семейства адресов (AFI) для параметров OSPF интерфейсов. Варианты:
|
|
authentication dictionary |
Параметры аутентификации на интерфейсе. |
|
enable boolean |
Включить или отключить аутентификацию на интерфейсе. Варианты:
|
|
key_chain string |
Цепочка ключей пароля для аутентификации. |
|
message_digest boolean |
Использовать аутентификацию с дайджестом сообщений. Варианты:
|
|
null_auth boolean |
Использовать нулевую аутентификацию (отключить аутентификацию). Варианты:
|
|
authentication_key dictionary |
Настроить ключ аутентификации для интерфейса. |
|
encryption integer |
0 — далее следует незашифрованный ключ аутентификации. 3 — далее следует зашифрованный ключ аутентификации 3DES. 7 — далее следует зашифрованный ключ аутентификации Cisco типа 7. |
|
key string / обязательный |
Ключ аутентификации. Допустимые значения — зашифрованный пароль Cisco типа 7, зашифрованный пароль 3DES или незашифрованный (открытый текст) пароль, в зависимости от значения ключа шифрования. |
|
cost integer |
Стоимость, связанная с интерфейсом. |
|
dead_interval integer |
Значение интервала ожидания (в секундах). |
|
default_passive_interface boolean |
Установить для этого интерфейса атрибут пассивного интерфейса по умолчанию. Этот параметр несовместим с passive_interface. Варианты:
|
|
hello_interval integer |
Значение интервала Hello (в секундах). |
|
instance integer |
Идентификатор экземпляра. |
|
message_digest_key dictionary |
Параметры пароля (ключа) для аутентификации с дайджестом сообщений. |
|
encryption integer |
0 — далее следует незашифрованный пароль (ключ) OSPF. 3 — далее следует зашифрованный пароль (ключ) OSPF 3DES. 7 — далее следует зашифрованный пароль (ключ) OSPF Cisco типа 7. |
|
key string / обязательный |
Ключ аутентификации. Допустимые значения — зашифрованный пароль Cisco типа 7, зашифрованный пароль 3DES или незашифрованный (открытый текст) пароль, в зависимости от значения ключа шифрования. |
|
key_id integer / обязательный |
Идентификатор ключа. |
|
mtu_ignore boolean |
Включить или отключить обнаружение несоответствия MTU в OSPF. Варианты:
|
|
multi_areas list / elements=string |
Несколько областей, связанных с интерфейсом (не привязанных к процессу OSPF). Допустимые значения — идентификаторы областей в виде целого числа или IP-адреса. |
|
network string |
Тип сети. Варианты:
|
|
passive_interface boolean |
Запретить обновления маршрутизации на интерфейсе. Этот параметр несовместим с default_passive_interface. Варианты:
|
|
priority integer |
Приоритет маршрутизатора. |
|
processes list / elements=dictionary |
Конфигурация интерфейсов для процесса OSPF. |
|
area dictionary |
Область, связанная с интерфейсом. |
|
area_id string / обязательный |
Идентификатор области в формате IP-адреса. |
|
secondaries boolean |
Не включать вторичные адреса IPv4/IPv6. Варианты:
|
|
multi_areas list / elements=string |
Несколько областей, связанных с интерфейсом. Допустимые значения — идентификаторы областей в виде целого числа или IP-адреса. |
|
process_id string / обязательный |
Метка процесса OSPF. |
|
retransmit_interval integer |
Интервал повторной передачи пакетов. |
|
shutdown boolean |
Отключить OSPF на этом интерфейсе. Варианты:
|
|
transmit_delay integer |
Задержка передачи пакетов. |
|
name string / обязательный |
Имя/идентификатор интерфейса. |
running_config string | Этот параметр используется только с состоянием parsed. Значением этого параметра должен быть вывод, полученный с устройства NX-OS при выполнении команды show running-config | section “^interface”. Состояние parsed считывает конфигурацию из параметра |
state string | Состояние, в котором должна остаться конфигурация. Варианты:
|
Примечания
Примечание
- Не поддерживается на Cisco MDS
Примеры
# Using merged
# Before state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# interface Ethernet1/2
# no switchport
# interface Ethernet1/3
# no switchport
- name: Merge the provided configuration with the existing running configuration
cisco.nxos.nxos_ospf_interfaces:
config:
- name: Ethernet1/1
address_family:
- afi: ipv4
processes:
- process_id: '100'
area:
area_id: 1.1.1.1
secondaries: false
multi_areas:
- 11.11.11.11
- afi: ipv6
processes:
- process_id: '200'
area:
area_id: 2.2.2.2
multi_areas:
- 21.0.0.0
- process_id: '300'
multi_areas:
- 50.50.50.50
multi_areas:
- 16.10.10.10
- name: Ethernet1/2
address_family:
- afi: ipv4
authentication:
enable: true
key_chain: test-1
message_digest_key:
key_id: 10
encryption: 3
key: abc01d272be25d29
cost: 100
- afi: ipv6
network: broadcast
shutdown: true
- name: Ethernet1/3
address_family:
- afi: ipv4
authentication_key:
encryption: 7
key: 12090404011C03162E
state: merged
# Task output:
# ------------
# before:
# - name: Ethernet1/1
# - name: Ethernet1/2
# - name: Ethernet1/3
#
# commands:
# - interface Ethernet1/1
# - ip router ospf multi-area 11.11.11.11
# - ip router ospf 100 area 1.1.1.1 secondaries none
# - ipv6 router ospfv3 multi-area 16.10.10.10
# - ipv6 router ospfv3 200 area 2.2.2.2
# - ipv6 router ospfv3 200 multi-area 21.0.0.0
# - ipv6 router ospfv3 300 multi-area 50.50.50.50
# - interface Ethernet1/2
# - ip ospf authentication key-chain test-1
# - ip ospf authentication
# - ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# - ip ospf cost 100
# - ospfv3 network broadcast
# - ospfv3 shutdown
# - interface Ethernet1/3
# - ip ospf authentication-key 7 12090404011C03162E
#
# after:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.11
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# - afi: ipv6
# multi_areas:
# - 16.10.10.10
# processes:
# - area:
# area_id: 2.2.2.2
# multi_areas:
# - 21.0.0.0
# process_id: '200'
# - multi_areas:
# - 50.50.50.50
# process_id: '300'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
# After state:
# ------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 multi-area 16.10.10.10
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
# Using replaced
# Before state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 multi-area 16.10.10.10
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
- name: Replace OSPF configurations of listed interfaces with provided configurations
cisco.nxos.nxos_ospf_interfaces:
config:
- name: Ethernet1/1
address_family:
- afi: ipv4
processes:
- process_id: "100"
area:
area_id: 1.1.1.1
secondaries: false
multi_areas:
- 11.11.11.12
- name: Ethernet1/3
state: replaced
# Task output:
# ------------
# before:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.11
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# - afi: ipv6
# multi_areas:
# - 16.10.10.10
# processes:
# - area:
# area_id: 2.2.2.2
# multi_areas:
# - 21.0.0.0
# process_id: '200'
# - multi_areas:
# - 50.50.50.50
# process_id: '300'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
#
# commands:
# - interface Ethernet1/1
# - ip router ospf multi-area 11.11.11.12
# - no ip router ospf multi-area 11.11.11.11
# - no ipv6 router ospfv3 multi-area 16.10.10.10
# - no ipv6 router ospfv3 200 area 2.2.2.2
# - no ipv6 router ospfv3 200 multi-area 21.0.0.0
# - no ipv6 router ospfv3 300 multi-area 50.50.50.50
# - interface Ethernet1/3
# - no ip ospf authentication-key 7 12090404011C03162E
#
# after:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.12
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - name: Ethernet1/3
#
# After state:
# ------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.12
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# Using overridden
# Before state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 multi-area 16.10.10.10
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
- name: Override all OSPF interfaces configuration with provided configuration
cisco.nxos.nxos_ospf_interfaces:
config:
- name: Ethernet1/1
address_family:
- afi: ipv4
processes:
- process_id: "100"
area:
area_id: 1.1.1.1
secondaries: false
multi_areas:
- 11.11.11.12
state: overridden
# Task output:
# ------------
# before:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.11
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# - afi: ipv6
# multi_areas:
# - 16.10.10.10
# processes:
# - area:
# area_id: 2.2.2.2
# multi_areas:
# - 21.0.0.0
# process_id: '200'
# - multi_areas:
# - 50.50.50.50
# process_id: '300'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
#
# commands:
# - interface Ethernet1/2
# - no ip ospf authentication key-chain test-1
# - no ip ospf authentication
# - no ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# - no ip ospf cost 100
# - no ospfv3 network broadcast
# - no ospfv3 shutdown
# - interface Ethernet1/3
# - no ip ospf authentication-key 7 12090404011C03162E
# - interface Ethernet1/1
# - ip router ospf multi-area 11.11.11.12
# - no ip router ospf multi-area 11.11.11.11
# - no ipv6 router ospfv3 multi-area 16.10.10.10
# - no ipv6 router ospfv3 200 area 2.2.2.2
# - no ipv6 router ospfv3 200 multi-area 21.0.0.0
# - no ipv6 router ospfv3 300 multi-area 50.50.50.50
#
# after:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.12
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# name: Ethernet1/1
# - name: Ethernet1/2
# - name: Ethernet1/3
# After state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.12
# interface Ethernet1/2
# no switchport
# interface Ethernet1/3
# no switchport
# Using deleted to delete OSPF config of a single interface
# Before state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 multi-area 16.10.10.10
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
- name: Delete OSPF config from a single interface
cisco.nxos.nxos_ospf_interfaces:
config:
- name: Ethernet1/1
state: deleted
# Task output:
# ------------
# before:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.11
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# - afi: ipv6
# multi_areas:
# - 16.10.10.10
# processes:
# - area:
# area_id: 2.2.2.2
# multi_areas:
# - 21.0.0.0
# process_id: '200'
# - multi_areas:
# - 50.50.50.50
# process_id: '300'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
#
# commands:
# - interface Ethernet1/1
# - no ip router ospf multi-area 11.11.11.11
# - no ip router ospf 100 area 1.1.1.1 secondaries none
# - no ipv6 router ospfv3 multi-area 16.10.10.10
# - no ipv6 router ospfv3 200 area 2.2.2.2
# - no ipv6 router ospfv3 200 multi-area 21.0.0.0
# - no ipv6 router ospfv3 300 multi-area 50.50.50.50
#
# after:
# - name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
# After state:
# ------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
# Using deleted to delete OSPF config from all interfaces
# Before state:
# -------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 multi-area 16.10.10.10
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# ip ospf authentication-key 7 12090404011C03162E
- name: Delete OSPF config from all interfaces
cisco.nxos.nxos_ospf_interfaces:
state: deleted
# Task output:
# ------------
# before:
# - name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
#
# commands:
# - interface Ethernet1/1
# - no ip router ospf multi-area 11.11.11.11
# - no ip router ospf 100 area 1.1.1.1 secondaries none
# - no ipv6 router ospfv3 multi-area 16.10.10.10
# - no ipv6 router ospfv3 200 area 2.2.2.2
# - no ipv6 router ospfv3 200 multi-area 21.0.0.0
# - no ipv6 router ospfv3 300 multi-area 50.50.50.50
# - interface Ethernet1/2
# - no ip ospf authentication key-chain test-1
# - no ip ospf authentication
# - no ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# - no ip ospf cost 100
# - no ospfv3 network broadcast
# - no ospfv3 shutdown
# - interface Ethernet1/3
# - no ip ospf authentication-key 7 12090404011C03162E
#
# after:
# - name: Ethernet1/1
# - name: Ethernet1/2
# - name: Ethernet1/3
# After state:
# ------------
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# interface Ethernet1/2
# no switchport
# interface Ethernet1/3
# no switchport
# Using rendered
- name: >-
Render platform specific configuration lines with state rendered (without
connecting to the device)
cisco.nxos.nxos_ospf_interfaces:
config:
- name: Ethernet1/1
address_family:
- afi: ipv4
processes:
- process_id: '100'
area:
area_id: 1.1.1.1
secondaries: false
multi_areas:
- 11.11.11.11
- afi: ipv6
processes:
- process_id: '200'
area:
area_id: 2.2.2.2
multi_areas:
- 21.0.0.0
- process_id: '300'
multi_areas:
- 50.50.50.50
multi_areas:
- 16.10.10.10
- name: Ethernet1/2
address_family:
- afi: ipv4
authentication:
enable: true
key_chain: test-1
message_digest_key:
key_id: 10
encryption: 3
key: abc01d272be25d29
cost: 100
- afi: ipv6
network: broadcast
shutdown: true
- name: Ethernet1/3
address_family:
- afi: ipv4
authentication_key:
encryption: 7
key: 12090404011C03162E
state: rendered
# Task Output:
# ------------
# rendered:
# - interface Ethernet1/1
# - ip router ospf multi-area 11.11.11.11
# - ip router ospf 100 area 1.1.1.1 secondaries none
# - ipv6 router ospfv3 multi-area 16.10.10.10
# - ipv6 router ospfv3 200 area 2.2.2.2
# - ipv6 router ospfv3 200 multi-area 21.0.0.0
# - ipv6 router ospfv3 300 multi-area 50.50.50.50
# - interface Ethernet1/2
# - ip ospf authentication key-chain test-1
# - ip ospf authentication
# - ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# - ip ospf cost 100
# - ospfv3 network broadcast
# - ospfv3 shutdown
# - interface Ethernet1/3
# - ip ospf authentication-key 7 12090404011C03162E
# Using parsed
# parsed.cfg
# ------------
# interface Ethernet1/1
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.11
# ipv6 router ospfv3 200 area 2.2.2.2
# ipv6 router ospfv3 200 multi-area 21.0.0.0
# ipv6 router ospfv3 300 multi-area 50.50.50.50
# ipv6 router ospfv3 multi-area 16.10.10.10
# interface Ethernet1/2
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# ip ospf authentication-key 7 12090404011C03162E
- name: arse externally provided OSPF interfaces config
cisco.nxos.nxos_ospf_interfaces:
running_config: "{{ lookup('file', 'ospf_interfaces.cfg') }}"
state: parsed
# Task output:
# ------------
# parsed:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.11
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# - afi: ipv6
# multi_areas:
# - 16.10.10.10
# processes:
# - area:
# area_id: 2.2.2.2
# multi_areas:
# - 21.0.0.0
# process_id: '200'
# - multi_areas:
# - 50.50.50.50
# process_id: '300'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - address_family:
# - afi: ipv4
# authentication_key:
# encryption: 7
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# name: Ethernet1/3
# Using gathered
# On-box config
# NXOS# show running-config | section ^interface
# interface Ethernet1/1
# no switchport
# ip router ospf 100 area 1.1.1.1 secondaries none
# ip router ospf multi-area 11.11.11.12
# interface Ethernet1/2
# no switchport
# ip ospf authentication
# ip ospf authentication key-chain test-1
# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
# ip ospf cost 100
# ospfv3 network broadcast
# ospfv3 shutdown
# interface Ethernet1/3
# no switchport
# Task output:
# ------------
# gathered:
# - address_family:
# - afi: ipv4
# multi_areas:
# - 11.11.11.12
# processes:
# - area:
# area_id: 1.1.1.1
# secondaries: false
# process_id: '100'
# name: Ethernet1/1
# - address_family:
# - afi: ipv4
# authentication:
# enable: true
# key_chain: test-1
# cost: 100
# message_digest_key:
# encryption: 3
# key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
# key_id: 10
# - afi: ipv6
# network: broadcast
# shutdown: true
# name: Ethernet1/2
# - name: Ethernet1/3
Возвращаемые значения
Общие возвращаемые значения описаны здесь; ниже перечислены поля, уникальные для этого модуля:
Ключ | Описание |
|---|---|
after list / elements=string | Результирующая конфигурация после применения модели. Возвращается: при изменении Пример: |
before list / elements=string | Конфигурация до применения модели. Возвращается: всегда Пример: |
commands list / elements=string | Набор команд, отправленных на удалённое устройство. Возвращается: всегда Пример: |
gathered list / elements=string | Сведения о сетевом ресурсе, собранные с удалённого устройства в виде структурированных данных. Возвращается: если state имеет значение Пример: |
parsed list / elements=string | Собственная конфигурация устройства, переданная в параметре running_config и разобранная в структурированные данные согласно спецификации аргументов модуля. Возвращается: если state имеет значение Пример: |
rendered list / elements=string | Конфигурация, переданная в задаче и преобразованная в собственный формат устройства (в автономном режиме). Возвращается: если state имеет значение Пример: |
Ссылки на коллекцию
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/cisco/nxos/nxos_ospf_interfaces_module.html