cisco.nxos.nxos_ospf_interfaces (7.0.0) — module

OSPF Interfaces Resource Module.

| "added in version" 1.3.0 of cisco.nxos"

Authors: Nilashish Chakraborty (@NilashishC)

Install collection

Install with ansible-galaxy collection install cisco.nxos:==7.0.0


Add to requirements.yml

  collections:
    - name: cisco.nxos
      version: 7.0.0

Description

This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco NX-OS.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

# 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

Inputs

    
state:
    choices:
    - merged
    - replaced
    - overridden
    - deleted
    - gathered
    - parsed
    - rendered
    default: merged
    description:
    - The state the configuration should be left in.
    type: str

config:
    description: A list of OSPF configuration for interfaces.
    elements: dict
    suboptions:
      address_family:
        description:
        - OSPF settings on the interfaces in address-family context.
        elements: dict
        suboptions:
          afi:
            choices:
            - ipv4
            - ipv6
            description:
            - Address Family Identifier (AFI) for OSPF settings on the interfaces.
            required: true
            type: str
          authentication:
            description:
            - Authentication settings on the interface.
            suboptions:
              enable:
                description:
                - Enable/disable authentication on the interface.
                type: bool
              key_chain:
                description:
                - Authentication password key-chain.
                type: str
              message_digest:
                description:
                - Use message-digest authentication.
                type: bool
              null_auth:
                description:
                - Use null(disable) authentication.
                type: bool
            type: dict
          authentication_key:
            description:
            - Configure the authentication key for the interface.
            suboptions:
              encryption:
                description:
                - 0 Specifies an UNENCRYPTED authentication key will follow.
                - 3 Specifies an 3DES ENCRYPTED authentication key will follow.
                - 7 Specifies a Cisco type 7  ENCRYPTED authentication key will follow.
                type: int
              key:
                description:
                - Authentication key.
                - Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password
                  and UNENCRYPTED (cleartext) password based on the value of encryption
                  key.
                required: true
                type: str
            type: dict
          cost:
            description:
            - Cost associated with interface.
            type: int
          dead_interval:
            description:
            - Dead interval value (in seconds).
            type: int
          default_passive_interface:
            description:
            - Set passive-interface attribute on this interface to default.
            - This option is mutually exclusive with I(passive_interface).
            type: bool
          hello_interval:
            description:
            - Hello interval value (in seconds).
            type: int
          instance:
            description:
            - Instance identifier.
            type: int
          message_digest_key:
            description:
            - Message digest authentication password (key) settings.
            suboptions:
              encryption:
                description:
                - 0 Specifies an UNENCRYPTED ospf password (key) will follow.
                - 3 Specifies an 3DES ENCRYPTED ospf password (key) will follow.
                - 7 Specifies a Cisco type 7 ENCRYPTED the ospf password (key) will follow.
                type: int
              key:
                description:
                - Authentication key.
                - Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password
                  and UNENCRYPTED (cleartext) password based on the value of encryption
                  key.
                required: true
                type: str
              key_id:
                description:
                - Key ID.
                required: true
                type: int
            type: dict
          mtu_ignore:
            description:
            - Enable/disable OSPF MTU mismatch detection.
            type: bool
          multi_areas:
            description:
            - Multi-Areas associated with interface (not tied to OSPF process).
            - Valid values are Area Ids as an integer or IP address.
            elements: str
            type: list
          network:
            choices:
            - broadcast
            - point-to-point
            description:
            - Network type.
            type: str
          passive_interface:
            description:
            - Suppress routing updates on the interface.
            - This option is mutually exclusive with I(default_passive_interface).
            type: bool
          priority:
            description:
            - Router priority.
            type: int
          processes:
            description:
            - Interfaces configuration for an OSPF process.
            elements: dict
            suboptions:
              area:
                description:
                - Area associated with interface.
                suboptions:
                  area_id:
                    description:
                    - Area ID in IP address format.
                    required: true
                    type: str
                  secondaries:
                    description:
                    - Do not include secondary IPv4/IPv6 addresses.
                    type: bool
                type: dict
              multi_areas:
                description:
                - Multi-Areas associated with interface.
                - Valid values are Area Ids as an integer or IP address.
                elements: str
                type: list
              process_id:
                description:
                - OSPF process tag.
                required: true
                type: str
            type: list
          retransmit_interval:
            description:
            - Packet retransmission interval.
            type: int
          shutdown:
            description:
            - Shutdown OSPF on this interface.
            type: bool
          transmit_delay:
            description:
            - Packet transmission delay.
            type: int
        type: list
      name:
        description:
        - Name/Identifier of the interface.
        required: true
        type: str
    type: list

running_config:
    description:
    - This option is used only with state I(parsed).
    - The value of this option should be the output received from the NX-OS device by
      executing the command B(show running-config | section "^interface").
    - The state I(parsed) reads the configuration from C(running_config) option and transforms
      it into Ansible structured data as per the resource module's argspec and the value
      is then returned in the I(parsed) key within the result.
    type: str

Outputs

after:
  description: The resulting configuration model invocation.
  returned: when changed
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
  type: list
before:
  description: The configuration prior to the model invocation.
  returned: always
  sample: "The configuration returned will always be in the same format\n of the parameters\
    \ above.\n"
  type: list
commands:
  description: The set of commands pushed to the remote device.
  returned: always
  sample:
  - interface Ethernet1/1
  - ip router ospf multi-area 11.11.11.11
  - ip router ospf 100 area 1.1.1.1 secondaries none
  - no 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
  - no ip ospf authentication key-chain test-1
  - ip ospf authentication
  type: list
gathered:
  description: Facts about the network resource gathered from the remote device as
    structured data.
  returned: when I(state) is C(gathered)
  sample: 'This output will always be in the same format as the module argspec.

    '
  type: list
parsed:
  description: The device native config provided in I(running_config) option parsed
    into structured data as per module argspec.
  returned: when I(state) is C(parsed)
  sample: 'This output will always be in the same format as the module argspec.

    '
  type: list
rendered:
  description: The provided configuration in the task rendered in device-native format
    (offline).
  returned: when I(state) is C(rendered)
  sample:
  - interface Ethernet1/1
  - ip router ospf multi-area 11.11.11.11
  - ip router ospf 100 area 1.1.1.1 secondaries none
  type: list