W3cubDocs

/Ansible 2.10

cisco.ios.ios_ospf_interfaces – OSPF_Interfaces resource module

Note

This plugin is part of the cisco.ios collection.

To install it use: ansible-galaxy collection install cisco.ios.

To use it in a playbook, specify: cisco.ios.ios_ospf_interfaces.

New in version 1.0.0: of cisco.ios

Synopsis

  • This module configures and manages the Open Shortest Path First (OSPF) version 2 on IOS platforms.

Parameters

Parameter Choices/Defaults Comments
config
list / elements=dictionary
A dictionary of OSPF interfaces options.
address_family
list / elements=dictionary
OSPF interfaces settings on the interfaces in address-family context.
adjacency
boolean
    Choices:
  • no
  • yes
Adjacency staggering
afi
string / required
    Choices:
  • ipv4
  • ipv6
Address Family Identifier (AFI) for OSPF interfaces settings on the interfaces.
authentication
dictionary
Enable authentication
key_chain
string
Use a key-chain for cryptographic authentication keys
message_digest
string
Use message-digest authentication
null
string
Use no authentication
bfd
boolean
    Choices:
  • no
  • yes
BFD configuration commands
Enable/Disable BFD on this interface
cost
dictionary
Interface cost
dynamic_cost
dictionary
Specify dynamic cost options
Valid only with IPv6 OSPF config
default
integer
Specify default link metric value
hysteresis
dictionary
Specify hysteresis value for LSA dampening
percent
integer
Specify hysteresis percent changed. Please refer vendor documentation of Valid values.
threshold
integer
Specify hysteresis threshold value. Please refer vendor documentation of Valid values.
weight
dictionary
Specify weight to be placed on individual metrics
l2_factor
integer
Specify weight to be given to L2-factor metric
Percentage weight of L2-factor metric. Please refer vendor documentation of Valid values.
latency
integer
Specify weight to be given to latency metric.
Percentage weight of latency metric. Please refer vendor documentation of Valid values.
oc
boolean
    Choices:
  • no
  • yes
Specify weight to be given to cdr/mdr for oc
Give 100 percent weightage for current data rate(0 for maxdatarate)
resources
integer
Specify weight to be given to resources metric
Percentage weight of resources metric. Please refer vendor documentation of Valid values.
throughput
integer
Specify weight to be given to throughput metric
Percentage weight of throughput metric. Please refer vendor documentation of Valid values.
interface_cost
integer
Interface cost or Route cost of this interface
database_filter
boolean
    Choices:
  • no
  • yes
Filter OSPF LSA during synchronization and flooding
dead_interval
dictionary
Interval after which a neighbor is declared dead
minimal
integer
Set to 1 second and set multiplier for Hellos
Number of Hellos sent within 1 second. Please refer vendor documentation of Valid values.
Valid only with IP OSPF config
time
integer
time in seconds
demand_circuit
dictionary
OSPF Demand Circuit, enable or disable the demand circuit'
disable
boolean
    Choices:
  • no
  • yes
Disable demand circuit on this interface
Valid only with IPv6 OSPF config
enable
boolean
    Choices:
  • no
  • yes
Enable Demand Circuit
ignore
boolean
    Choices:
  • no
  • yes
Ignore demand circuit auto-negotiation requests
flood_reduction
boolean
    Choices:
  • no
  • yes
OSPF Flood Reduction
hello_interval
integer
Time between HELLO packets
Please refer vendor documentation of Valid values.
lls
boolean
    Choices:
  • no
  • yes
Link-local Signaling (LLS) support
Valid only with IP OSPF config
manet
dictionary
Mobile Adhoc Networking options
MANET Peering options
Valid only with IPv6 OSPF config
cost
dictionary
Redundant path cost improvement required to peer
percent
integer
Relative incremental path cost. Please refer vendor documentation of Valid values.
threshold
integer
Absolute incremental path cost. Please refer vendor documentation of Valid values.
link_metrics
dictionary
Redundant path cost improvement required to peer
cost_threshold
integer
Minimum link cost threshold. Please refer vendor documentation of Valid values.
set
boolean
    Choices:
  • no
  • yes
Enable link-metrics
mtu_ignore
boolean
    Choices:
  • no
  • yes
Ignores the MTU in DBD packets
multi_area
dictionary
Set the OSPF multi-area ID
Valid only with IP OSPF config
cost
integer
Interface cost
id
integer
OSPF multi-area ID as a decimal value. Please refer vendor documentation of Valid values.
OSPF multi-area ID in IP address format(e.g. A.B.C.D)
neighbor
dictionary
OSPF neighbor link-local IPv6 address (X:X:X:X::X)
Valid only with IPv6 OSPF config
address
string
Neighbor link-local IPv6 address
cost
integer
OSPF cost for point-to-multipoint neighbor
database_filter
boolean
    Choices:
  • no
  • yes
Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor
poll_interval
integer
OSPF dead-router polling interval
priority
integer
OSPF priority of non-broadcast neighbor
network
dictionary
Network type
broadcast
boolean
    Choices:
  • no
  • yes
Specify OSPF broadcast multi-access network
manet
boolean
    Choices:
  • no
  • yes
Specify MANET OSPF interface type
Valid only with IPv6 OSPF config
non_broadcast
boolean
    Choices:
  • no
  • yes
Specify OSPF NBMA network
point_to_multipoint
boolean
    Choices:
  • no
  • yes
Specify OSPF point-to-multipoint network
point_to_point
boolean
    Choices:
  • no
  • yes
Specify OSPF point-to-point network
prefix_suppression
boolean
    Choices:
  • no
  • yes
Enable/Disable OSPF prefix suppression
priority
integer
Router priority. Please refer vendor documentation of Valid values.
process
dictionary
OSPF interfaces process config
area_id
string
OSPF interfaces area ID as a decimal value. Please refer vendor documentation of Valid values.
OSPF interfaces area ID in IP address format(e.g. A.B.C.D)
id
integer
Address Family Identifier (AFI) for OSPF interfaces settings on the interfaces. Please refer vendor documentation of Valid values.
instance_id
integer
Set the OSPF instance based on ID
Valid only with IPv6 OSPF config
secondaries
boolean
    Choices:
  • no
  • yes
Include or exclude secondary IP addresses.
Valid only with IPv4 config
resync_timeout
integer
Interval after which adjacency is reset if oob-resync is not started. Please refer vendor documentation of Valid values.
retransmit_interval
integer
Time between retransmitting lost link state advertisements. Please refer vendor documentation of Valid values.
shutdown
boolean
    Choices:
  • no
  • yes
Set OSPF protocol's state to disable under current interface
transmit_delay
integer
Link state transmit delay. Please refer vendor documentation of Valid values.
ttl_security
dictionary
TTL security check
Valid only with IPV4 OSPF config
hops
integer
Maximum number of IP hops allowed
Please refer vendor documentation of Valid values.
set
boolean
    Choices:
  • no
  • yes
Enable TTL Security on all interfaces
name
string / required
Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
running_config
string
This option is used only with state parsed.
The value of this option should be the output received from the IOS device by executing the command sh running-config | section ^interface.
The state parsed reads the configuration from 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 parsed key within the result.
state
string
    Choices:
  • merged
  • replaced
  • overridden
  • deleted
  • gathered
  • rendered
  • parsed
The state the configuration should be left in
The states rendered, gathered and parsed does not perform any change on the device.
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result.
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config | include ip route|ipv6 route executed on device. For state parsed active connection to remote host is not required.

Notes

Note

  • Tested against Cisco IOSv Version 15.2 on VIRL.

Examples

# Using deleted

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ipv6 ospf 55 area 105
#  ipv6 ospf priority 20
#  ipv6 ospf transmit-delay 30
#  ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
#  ip ospf priority 40
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf 10 area 20
#  ip ospf cost 30

- name: Delete provided OSPF Interface config
  cisco.ios.ios_ospf_interfaces:
    config:
      - name: GigabitEthernet0/1
    state: deleted

#  Commands Fired:
#  ---------------
#
#  "commands": [
#         "interface GigabitEthernet0/1",
#         "no ipv6 ospf 55 area 105",
#         "no ipv6 ospf adjacency stagger disable",
#         "no ipv6 ospf priority 20",
#         "no ipv6 ospf transmit-delay 30"
#     ]

# After state:
# -------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# interface GigabitEthernet0/2
#  ip ospf priority 40
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf 10 area 20
#  ip ospf cost 30

# Using deleted without any config passed (NOTE: This will delete all OSPF Interfaces configuration from device)

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ipv6 ospf 55 area 105
#  ipv6 ospf priority 20
#  ipv6 ospf transmit-delay 30
#  ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
#  ip ospf priority 40
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf 10 area 20
#  ip ospf cost 30

- name: Delete all OSPF config from interfaces
  cisco.ios.ios_ospf_interfaces:
    state: deleted

# Commands Fired:
# ---------------
#
#  "commands": [
#         "interface GigabitEthernet0/2",
#         "no ip ospf 10 area 20",
#         "no ip ospf adjacency stagger disable",
#         "no ip ospf cost 30",
#         "no ip ospf priority 40",
#         "no ip ospf ttl-security hops 50",
#         "interface GigabitEthernet0/1",
#         "no ipv6 ospf 55 area 105",
#         "no ipv6 ospf adjacency stagger disable",
#         "no ipv6 ospf priority 20",
#         "no ipv6 ospf transmit-delay 30"
#     ]

# After state:
# -------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# interface GigabitEthernet0/2

# Using merged

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# router-ios#

- name: Merge provided OSPF Interfaces configuration
  cisco.ios.ios_ospf_interfaces:
    config:
      - name: GigabitEthernet0/1
        address_family:
          - afi: ipv4
            process:
              id: 10
              area_id: 30
            adjacency: true
            bfd: true
            cost:
              interface_cost: 5
            dead_interval:
              time: 5
            demand_circuit:
              ignore: true
            network:
              broadcast: true
            priority: 25
            resync_timeout: 10
            shutdown: true
            ttl_security:
              hops: 50
          - afi: ipv6
            process:
              id: 35
              area_id: 45
            adjacency: true
            database_filter: true
            manet:
              link_metrics:
                cost_threshold: 10
            priority: 55
            transmit_delay: 45
    state: merged

#  Commands Fired:
#  ---------------
#
#   "commands": [
#         "interface GigabitEthernet0/1",
#         "ip ospf 10 area 30",
#         "ip ospf adjacency stagger disable",
#         "ip ospf bfd",
#         "ip ospf cost 5",
#         "ip ospf dead-interval 5",
#         "ip ospf demand-circuit ignore",
#         "ip ospf network broadcast",
#         "ip ospf priority 25",
#         "ip ospf resync-timeout 10",
#         "ip ospf shutdown",
#         "ip ospf ttl-security hops 50",
#         "ipv6 ospf 35 area 45",
#         "ipv6 ospf adjacency stagger disable",
#         "ipv6 ospf database-filter all out",
#         "ipv6 ospf manet peering link-metrics 10",
#         "ipv6 ospf priority 55",
#         "ipv6 ospf transmit-delay 45"
#     ]

# After state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2

# Using overridden

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2

- name: Override provided OSPF Interfaces configuration
  cisco.ios.ios_ospf_interfaces:
    config:
      - name: GigabitEthernet0/1
        address_family:
          - afi: ipv6
            process:
              id: 55
              area_id: 105
            adjacency: true
            priority: 20
            transmit_delay: 30
      - name: GigabitEthernet0/2
        address_family:
          - afi: ipv4
            process:
              id: 10
              area_id: 20
            adjacency: true
            cost:
              interface_cost: 30
            priority: 40
            ttl_security:
              hops: 50
    state: overridden

# Commands Fired:
# ---------------
#
#  "commands": [
#         "interface GigabitEthernet0/2",
#         "ip ospf 10 area 20",
#         "ip ospf adjacency stagger disable",
#         "ip ospf cost 30",
#         "ip ospf priority 40",
#         "ip ospf ttl-security hops 50",
#         "interface GigabitEthernet0/1",
#         "ipv6 ospf 55 area 105",
#         "no ipv6 ospf database-filter all out",
#         "no ipv6 ospf manet peering link-metrics 10",
#         "ipv6 ospf priority 20",
#         "ipv6 ospf transmit-delay 30",
#         "no ip ospf 10 area 30",
#         "no ip ospf adjacency stagger disable",
#         "no ip ospf bfd",
#         "no ip ospf cost 5",
#         "no ip ospf dead-interval 5",
#         "no ip ospf demand-circuit ignore",
#         "no ip ospf network broadcast",
#         "no ip ospf priority 25",
#         "no ip ospf resync-timeout 10",
#         "no ip ospf shutdown",
#         "no ip ospf ttl-security hops 50"
#     ]

# After state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ipv6 ospf 55 area 105
#  ipv6 ospf priority 20
#  ipv6 ospf transmit-delay 30
#  ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
#  ip ospf priority 40
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf 10 area 20
#  ip ospf cost 30

# Using replaced

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2

- name: Replaced provided OSPF Interfaces configuration
  cisco.ios.ios_ospf_interfaces:
    config:
      - name: GigabitEthernet0/2
        address_family:
          - afi: ipv6
            process:
              id: 55
              area_id: 105
            adjacency: true
            priority: 20
            transmit_delay: 30
    state: replaced

# Commands Fired:
# ---------------
#  "commands": [
#         "interface GigabitEthernet0/2",
#         "ipv6 ospf 55 area 105",
#         "ipv6 ospf adjacency stagger disable",
#         "ipv6 ospf priority 20",
#         "ipv6 ospf transmit-delay 30"
#     ]

# After state:
# -------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
#  ipv6 ospf 55 area 105
#  ipv6 ospf priority 20
#  ipv6 ospf transmit-delay 30
#  ipv6 ospf adjacency stagger disable

# Using Gathered

# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2

- name: Gather OSPF Interfaces provided configurations
  cisco.ios.ios_ospf_interfaces:
    config:
    state: gathered

# Module Execution Result:
# ------------------------
#
#  "gathered": [
#         {
#             "name": "GigabitEthernet0/2"
#         },
#         {
#             "address_family": [
#                 {
#                     "adjacency": true,
#                     "afi": "ipv4",
#                     "bfd": true,
#                     "cost": {
#                         "interface_cost": 5
#                     },
#                     "dead_interval": {
#                         "time": 5
#                     },
#                     "demand_circuit": {
#                         "ignore": true
#                     },
#                     "network": {
#                         "broadcast": true
#                     },
#                     "priority": 25,
#                     "process": {
#                         "area_id": "30",
#                         "id": 10
#                     },
#                     "resync_timeout": 10,
#                     "shutdown": true,
#                     "ttl_security": {
#                         "hops": 50
#                     }
#                 },
#                 {
#                     "adjacency": true,
#                     "afi": "ipv6",
#                     "database_filter": true,
#                     "manet": {
#                         "link_metrics": {
#                             "cost_threshold": 10
#                         }
#                     },
#                     "priority": 55,
#                     "process": {
#                         "area_id": "45",
#                         "id": 35
#                     },
#                     "transmit_delay": 45
#                 }
#             ],
#             "name": "GigabitEthernet0/1"
#         },
#         {
#             "name": "GigabitEthernet0/0"
#         }
#  ]

# After state:
# ------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2

# Using Rendered

- name: Render the commands for provided  configuration
  cisco.ios.ios_ospf_interfaces:
    config:
      - name: GigabitEthernet0/1
        address_family:
          - afi: ipv4
            process:
              id: 10
              area_id: 30
            adjacency: true
            bfd: true
            cost:
              interface_cost: 5
            dead_interval:
              time: 5
            demand_circuit:
              ignore: true
            network:
              broadcast: true
            priority: 25
            resync_timeout: 10
            shutdown: true
            ttl_security:
              hops: 50
          - afi: ipv6
            process:
              id: 35
              area_id: 45
            adjacency: true
            database_filter: true
            manet:
              link_metrics:
                cost_threshold: 10
            priority: 55
            transmit_delay: 45
    state: rendered

# Module Execution Result:
# ------------------------
#
#  "rendered": [
#         "interface GigabitEthernet0/1",
#         "ip ospf 10 area 30",
#         "ip ospf adjacency stagger disable",
#         "ip ospf bfd",
#         "ip ospf cost 5",
#         "ip ospf dead-interval 5",
#         "ip ospf demand-circuit ignore",
#         "ip ospf network broadcast",
#         "ip ospf priority 25",
#         "ip ospf resync-timeout 10",
#         "ip ospf shutdown",
#         "ip ospf ttl-security hops 50",
#         "ipv6 ospf 35 area 45",
#         "ipv6 ospf adjacency stagger disable",
#         "ipv6 ospf database-filter all out",
#         "ipv6 ospf manet peering link-metrics 10",
#         "ipv6 ospf priority 55",
#         "ipv6 ospf transmit-delay 45"
#     ]

# Using Parsed

# File: parsed.cfg
# ----------------
#
# interface GigabitEthernet0/2
# interface GigabitEthernet0/1
#  ip ospf network broadcast
#  ip ospf resync-timeout 10
#  ip ospf dead-interval 5
#  ip ospf priority 25
#  ip ospf demand-circuit ignore
#  ip ospf bfd
#  ip ospf adjacency stagger disable
#  ip ospf ttl-security hops 50
#  ip ospf shutdown
#  ip ospf 10 area 30
#  ip ospf cost 5
#  ipv6 ospf 35 area 45
#  ipv6 ospf priority 55
#  ipv6 ospf transmit-delay 45
#  ipv6 ospf database-filter all out
#  ipv6 ospf adjacency stagger disable
#  ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/0

- name: Parse the provided configuration with the exisiting running configuration
  cisco.ios.ios_ospf_interfaces:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Module Execution Result:
# ------------------------
#
#  "parsed": [
#         },
#         {
#             "name": "GigabitEthernet0/2"
#         },
#         {
#             "address_family": [
#                 {
#                     "adjacency": true,
#                     "afi": "ipv4",
#                     "bfd": true,
#                     "cost": {
#                         "interface_cost": 5
#                     },
#                     "dead_interval": {
#                         "time": 5
#                     },
#                     "demand_circuit": {
#                         "ignore": true
#                     },
#                     "network": {
#                         "broadcast": true
#                     },
#                     "priority": 25,
#                     "process": {
#                         "area_id": "30",
#                         "id": 10
#                     },
#                     "resync_timeout": 10,
#                     "shutdown": true,
#                     "ttl_security": {
#                         "hops": 50
#                     }
#                 },
#                 {
#                     "adjacency": true,
#                     "afi": "ipv6",
#                     "database_filter": true,
#                     "manet": {
#                         "link_metrics": {
#                             "cost_threshold": 10
#                         }
#                     },
#                     "priority": 55,
#                     "process": {
#                         "area_id": "45",
#                         "id": 35
#                     },
#                     "transmit_delay": 45
#                 }
#             ],
#             "name": "GigabitEthernet0/1"
#         },
#         {
#             "name": "GigabitEthernet0/0"
#         }
#     ]

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
after
dictionary
when changed
The resulting configuration model invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
before
dictionary
always
The configuration prior to the model invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
commands
list / elements=string
always
The set of commands pushed to the remote device.

Sample:
['interface GigabitEthernet0/1', 'ip ospf 10 area 30', 'ip ospf cost 5', 'ip ospf priority 25']


Authors

  • Sumit Jaiswal (@justjais)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/cisco/ios/ios_ospf_interfaces_module.html