cisco.iosxr.iosxr_ospfv2 – OSPFv2 resource module

Note

This plugin is part of the cisco.iosxr collection (version 1.2.1).

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

To use it in a playbook, specify: cisco.iosxr.iosxr_ospfv2.

New in version 1.0.0: of cisco.iosxr

Synopsis

  • This module manages global OSPFv2 configuration on devices running Cisco IOS-XR

Note

This module has a corresponding action plugin.

Parameters

Parameter Choices/Defaults Comments
config
dictionary
A list of OSPFv2 process configuration
processes
list / elements=dictionary
A list of OSPFv2 instances configuration
address_family_unicast
boolean
    Choices:
  • no
  • yes
Enable unicast topology for ipv4 address family
adjacency_stagger
dictionary
Stagger OSPFv2 adjacency bring up
disable
boolean
    Choices:
  • no
  • yes
Disable stagger OSPFv2 adjacency
max_adjacency
integer
Maximum simultaneous neighbors to bring up
min_adjacency
integer
Initial number of neighbors to bring up per area (default 2)
apply_weight
dictionary
Enable weights configured under interfaces for load sharing
bandwidth
integer
Reference bandwidth to use for calculation (Mbits/sec)
default_weight
integer
Specify default weight value to use when it is not configured under interface
areas
list / elements=dictionary
Configure OSPFv2 areas' properties
area_id
string / required
Area ID as IP address or integer
authentication
dictionary
Enable authentication
keychain
string
Specify keychain name
message_digest
dictionary
Use message-digest authentication
keychain
string
Specify keychain name
no_auth
boolean
    Choices:
  • no
  • yes
Use no authentication
authentication_key
dictionary
Used to mention authentication password (key)
clear
string
Specifies an UNENCRYPTED password (key) will follow
encrypted
string
Specifies an ENCRYPTED password (key) will follow
password
string
The OSPFv2 password (key)
bfd
dictionary
Configure BFD parameters
fast_detect
dictionary
Configure fast detection
set
boolean
    Choices:
  • no
  • yes
Enable fast detection only
strict_mode
boolean
    Choices:
  • no
  • yes
Hold down neighbor session until BFD session is up
minimum_interval
integer
Hello interval in milli-seconds
multiplier
integer
Detect multiplier
cost
integer
Interface cost
dead_interval
integer
Interval after which a neighbor is declared dead
default_cost
integer
Set the summary default-cost of a NSSA/stub area. Stub's advertised external route metric
hello_interval
integer
Time between HELLO packets
mpls
dictionary
Configure MPLS routing protocol parameters
ldp
dictionary
Configure LDP parameters
auto_config
boolean
    Choices:
  • no
  • yes
Enable LDP IGP interface auto-configuration
sync
boolean
    Choices:
  • no
  • yes
Enable LDP IGP synchronization
sync_igp_shortcuts
boolean
    Choices:
  • no
  • yes
LDP sync for igp-shortcut tunnels
traffic_eng
boolean
    Choices:
  • no
  • yes
Configure an ospf area to run MPLS Traffic Engineering
mtu_ignore
string
    Choices:
  • enable
  • disable
Enable/Disable ignoring of MTU in DBD packets
nssa
dictionary
NSSA settings for the area
default_information_originate
dictionary
Originate default Type 7 LSA
metric
integer
OSPFv2 default metric
metric_type
integer
Metric type for default routes
no_redistribution
boolean
    Choices:
  • no
  • yes
Do not send redistributed LSAs into NSSA area
no_summary
boolean
    Choices:
  • no
  • yes
Do not send summary LSAs into NSSA area
set
boolean
    Choices:
  • no
  • yes
Configure area as NSSA
translate
dictionary
Translate LSA
type7
dictionary
Translate from Type 7 to Type 5
always
boolean
    Choices:
  • no
  • yes
Always translate LSAs
ranges
list / elements=dictionary
Summarize routes matching address/mask (border routers only)
address
string / required
IP in Prefix format (x.x.x.x/len)
advertise
boolean
    Choices:
  • no
  • yes
Advertise this range (default)
not_advertise
boolean
    Choices:
  • no
  • yes
DoNotAdvertise this range
route_policy
list / elements=dictionary
Specify the route-policy to filter type 3 LSAs (list can have one inbound and/or one outbound policy only)
direction
string
    Choices:
  • in
  • out
Specify inbound or outbound
parameters
list / elements=string
Specify parameter values for the policy
stub
dictionary
Settings for configuring the area as a stub
no_summary
boolean
    Choices:
  • no
  • yes
Do not send summary LSA into stub area
set
boolean
    Choices:
  • no
  • yes
Configure the area as a stub
transmit_delay
integer
Estimated time needed to send link-state update packet
virtual_link
list / elements=dictionary
Define a virtual link
authentication
dictionary
Enable authentication
keychain
string
Specify keychain name
message_digest
dictionary
Use message-digest authentication
keychain
string
Specify keychain name
no_auth
boolean
    Choices:
  • no
  • yes
Use no authentication
authentication_key
dictionary
Used to mention authentication password (key)
clear
string
Specifies an UNENCRYPTED password (key) will follow
encrypted
string
Specifies an ENCRYPTED password (key) will follow
password
string
The OSPFv2 password (key)
dead_interval
integer
Interval after which a neighbor is declared dead
hello_interval
integer
Time between HELLO packets
id
string / required
Router-ID of virtual link neighbor (A.B.C.D)
message_digest_key
dictionary
Message digest authentication password (key)
id
integer / required
Key ID (1-255)
md5
dictionary
Use MD5 Algorithm
clear
boolean
    Choices:
  • no
  • yes
Specifies an UNENCRYPTED password (key) will follow
encrypted
boolean
    Choices:
  • no
  • yes
Specifies an ENCRYPTED password (key) will follow
password
string
The OSPFv2 password (key)
retransmit_interval
integer
Delay between LSA retransmissions
transmit_delay
integer
Link state transmit delay
authentication
dictionary
Enable authentication
keychain
string
Specify keychain name
message_digest
dictionary
Use message-digest authentication
keychain
string
Specify keychain name
set
boolean
    Choices:
  • no
  • yes
Specify message-digest selection
no_auth
boolean
    Choices:
  • no
  • yes
Use no authentication
authentication_key
dictionary
Used to mention authentication password (key)
clear
boolean
    Choices:
  • no
  • yes
Specifies an UNENCRYPTED password (key) will follow
encrypted
boolean
    Choices:
  • no
  • yes
Specifies an ENCRYPTED password (key) will follow
password
string
The OSPFv2 password (key)
auto_cost
dictionary
Calculate OSPFv2 interface cost according to bandwidth
disable
boolean
    Choices:
  • no
  • yes
Assign OSPFv2 cost based on interface type
reference_bandwidth
integer
Specify reference bandwidth in megabits per sec
bfd
dictionary
Configure BFD parameters
fast_detect
dictionary
Configure fast detection
set
boolean
    Choices:
  • no
  • yes
Enable fast detection only
strict_mode
boolean
    Choices:
  • no
  • yes
Hold down neighbor session until BFD session is up
minimum_interval
integer
Hello interval in milli-seconds
multiplier
integer
Detect multiplier
capability
dictionary
Enable specific OSPFv2 feature
opaque
dictionary
Configure opaque LSA
disable
boolean
    Choices:
  • no
  • yes
Disable Opaque LSA capability
set
boolean
    Choices:
  • no
  • yes
Enable opaque LSA
type7
string
NSSA capability
cost
integer
Interface cost (1-65535)
database_filter
string
    Choices:
  • enable
  • disable
Filter OSPFv2 LSA during synchronization and flooding (all outgoing LSA). Enable/Disable filtering
dead_interval
integer
Interval after which a neighbor is declared dead
default_information_originate
dictionary
Distribute default route
always
boolean
    Choices:
  • no
  • yes
Always advertise default route
metric
integer
OSPFv2 default metric
metric_type
integer
OSPFv2 metric type for default routes
route_policy
string
Apply route-policy to default-information origination
set
boolean
    Choices:
  • no
  • yes
Enable distribution of default route
default_metric
integer
Set metric of redistributed routes
demand_circuit
string
    Choices:
  • enable
  • disable
Enable/Disable OSPFv2 demand circuit
distance
dictionary
Define an administrative distance
admin_distance
list / elements=dictionary
Administrative distance
access_list
string
Access list name
source
string
Source IP address
value
integer
Distance value
wildcard
string
IP wild card bits (A.B.C.D)
ospf_distance
dictionary
OSPFv2 administrative distance
external
integer
Distance for external routes
inter_area
integer
Distance for inter-area routes
intra_area
integer
Distance for intra-area routes
distribute_bgp_ls
dictionary
Enable Distribution of LSAs to external services
instance_id
integer
Set distribution process instance identifier
throttle
integer
Throttle time between successive LSA updates
distribute_link_state
dictionary
Enable Distribution of LSAs to external services
instance_id
integer
Set distribution process instance identifier
throttle
integer
Throttle time between successive LSA updates
distribute_list
list / elements=dictionary
Filter networks in routing updates (list can have one inbound and/or one outbound policy only)
access_list
string
Inbound/outbound access-list
direction
string
    Choices:
  • in
  • out
Filter incoming/outgoing routing updates
outgoing_params
dictionary
Specify additional parameters for outgoing updates only
id
string
For BGP, specify AS number. 2-byte AS number (or) 4-byte AS number in asdot (X.Y) format (or) 4-byte AS number in asplain format
For OSPF, specify OSPFv2 instance name
route_type
string
    Choices:
  • bgp
  • connected
  • dagr
  • ospf
  • static
Type of routes
route_policy
string
Route Policy to filter OSPFv2 prefixes (for incoming updates only)
external_out
string
    Choices:
  • enable
  • disable
Enable/Disable advertisement of intra-area prefixes as external
flood_reduction
string
    Choices:
  • enable
  • disable
Enable/Disable OSPFv2 Flood Reduction
hello_interval
integer
Time between HELLO packets (<1-65535> seconds)
ignore_lsa_mospf
boolean
    Choices:
  • no
  • yes
Do not complain upon receiving MOSPFv2 Type 6 LSA
link_down_fast_detect
boolean
    Choices:
  • no
  • yes
Enable fast or early detection of link-down events
log_adjacency_changes
dictionary
Log adjacency state changes
detail
boolean
    Choices:
  • no
  • yes
Log all state changes
disable
boolean
    Choices:
  • no
  • yes
Disable log adjacency changes
set
boolean
    Choices:
  • no
  • yes
Set log adjacency
loopback_stub_network
string
    Choices:
  • enable
  • disable
Advertise loopback as a stub network
max_lsa
dictionary
Feature to limit the number of non-self-originated LSAs
ignore_count
integer
Set count on how many times adjacencies can be suppressed
ignore_time
integer
Set number of minutes during which all adjacencies are suppressed
reset_time
integer
Set number of minutes after which ignore-count is reset to zero
threshold
integer
Threshold value (%) at which to generate a warning message
warning_only
boolean
    Choices:
  • no
  • yes
Log a warning message when limit is exceeded
max_metric
dictionary
Set maximum metric
router_lsa
dictionary
Maximum metric in self-originated router-LSAs
external_lsa
dictionary
External LSA configuration
max_metric_value
integer
Set max metric value for external LSAs
set
boolean
    Choices:
  • no
  • yes
Set external-lsa attribute
include_stub
boolean
    Choices:
  • no
  • yes
Advertise Max metric for Stub links as well
on_startup
dictionary
Effective only at startup
set
boolean
    Choices:
  • no
  • yes
Set on-startup attribute
wait_for_bgp_asn
integer
ASN of BGP to wait for
wait_period
integer
Wait period in seconds after startup
set
boolean
    Choices:
  • no
  • yes
Set router-lsa attribute
summary_lsa
dictionary
Summary LSAs configuration
max_metric_value
integer
Max metric value for summary LSAs
set
boolean
    Choices:
  • no
  • yes
Set summary-lsa attribute
message_digest_key
dictionary
Message digest authentication password (key)
id
integer / required
Key ID
md5
dictionary / required
Use MD5 Algorithm
clear
boolean
    Choices:
  • no
  • yes
Specifies an UNENCRYPTED password (key) will follow
encrypted
boolean
    Choices:
  • no
  • yes
Specifies an ENCRYPTED password (key) will follow
password
string
The OSPFv2 password (key)
microloop_avoidance
dictionary
Avoid microloops
protected
boolean
    Choices:
  • no
  • yes
Avoid microloops for protected prefixes only)
rib_update_delay
integer
Delay to introduce between SPF and RIB updates
segment_routing
boolean
    Choices:
  • no
  • yes
Enable segment routing microloop avoidance
monitor_convergence
dictionary
Enables OSPFv2 route convergence monitoring
prefix_list
string
Enables Individual Prefix Monitoring
track_external_routes
boolean
    Choices:
  • no
  • yes
Enables Tracking External(Type-5/7) Prefix monitoring
track_ip_frr
boolean
    Choices:
  • no
  • yes
Enables Tracking IP-Frr Convergence
track_summary_routes
boolean
    Choices:
  • no
  • yes
Enables Tracking Summary(Inter-Area) Prefix monitoring
mpls
dictionary
Configure MPLS routing protocol parameters
ldp
dictionary
Configure LDP parameters
auto_config
boolean
    Choices:
  • no
  • yes
Enable LDP IGP interface auto-configuration
sync
boolean
    Choices:
  • no
  • yes
Enable LDP IGP synchronization
sync_igp_shortcuts
boolean
    Choices:
  • no
  • yes
LDP sync for igp-shortcut tunnels
traffic_eng
dictionary
Routing protocol commands for MPLS Traffic Engineering
autoroute_exclude
dictionary
Exclude IP address destinations from using TE tunnels
parameters
list / elements=string
Specify parameter values for the policy
route_policy
string
Policy name
igp_intact
boolean
    Choices:
  • no
  • yes
Retain one or more IPv4 nexthops with tunnel nexthops
ldp_sync_update
boolean
    Choices:
  • no
  • yes
Enable LDP sync induced metric propagation
multicast_intact
boolean
    Choices:
  • no
  • yes
Publish multicast-intact paths to RIB
router_id
string
Traffic Engineering stable IP address for system
mtu_ignore
string
    Choices:
  • enable
  • disable
Enable/Disable ignoring of MTU in DBD packets
network
dictionary
Network type
broadcast
boolean
    Choices:
  • no
  • yes
Specify OSPFv2 broadcast multi-access network
non_broadcast
boolean
    Choices:
  • no
  • yes
Specify OSPFv2 NBMA network
point_to_multipoint
boolean
    Choices:
  • no
  • yes
Specify OSPFv2 point-to-multipoint network
point_to_point
boolean
    Choices:
  • no
  • yes
Specify OSPFv2 point-to-point network
nsf
dictionary
Non-stop forwarding
cisco
dictionary
Cisco Non-stop forwarding
enforce_global
boolean
    Choices:
  • no
  • yes
Cancel NSF restart when non-NSF-aware neighbors detected for the whole OSPFv2 process
set
boolean
    Choices:
  • no
  • yes
Enable Cisco NSF
flush_delay_time
integer
Maximum time allowed for external route learning
ietf
dictionary
IETF graceful restart
helper_disable
boolean
    Choices:
  • no
  • yes
Disable router's helper support level
set
boolean
    Choices:
  • no
  • yes
Only enable ietf option
interval
integer
Minimum interval between NSF restarts (<90-3600> seconds)
lifetime
integer
Maximum route lifetime following restart (<90-1800> seconds)
nsr
boolean
    Choices:
  • no
  • yes
Enable NSR for all VRFs in this process. 'False' option to disable NSR for all VRFs in this process
packet_size
integer
Size of OSPFv2 packets to use. min=576 max=MTU bytes
passive
string
    Choices:
  • enable
  • disable
Enable/Disable passive
prefix_suppression
dictionary
Suppress advertisement of the prefixes
secondary_address
boolean
    Choices:
  • no
  • yes
Enable/Disable secondary address suppression
set
boolean
    Choices:
  • no
  • yes
Set the suppression option
priority
integer
Router priority
process_id
string / required
The OSPFv2 Process ID
protocol_shutdown
dictionary
Protocol specific configuration
host_mode
boolean
    Choices:
  • no
  • yes
Only traffic destined for this box allowed(cisco-support)
limit
dictionary
High watermark for incoming priority events
high
integer
Hello events are dropped when incoming event queue exceeds this value
low
integer
DBD/LS Update/Req packets are dropped when incoming event queue exceeds this value
medium
integer
LSA ACKs are dropped when incoming event queue exceeds this value
on_reload
boolean
    Choices:
  • no
  • yes
Shutdown post reload only
set
boolean
    Choices:
  • no
  • yes
Shutdown the OSPFv2 Protocol
redistribute
dictionary
Redistribute information from another routing Protocol
id
string
OnePK application name for application routes (or) AS number for bgp and eigrp (or) instance name for isis and ospf
level
integer
    Choices:
  • 1
  • 2
  • 12
ISIS levels
lsa_type_summary
boolean
    Choices:
  • no
  • yes
LSA type 3 for redistributed routes
match
string
Redistribution of routes. For OSPFv2 - external/internal/nssa-external 1/2. For EIGRP - external/internal
metric
integer
Metric for redistributed routes
metric_type
integer
    Choices:
  • 1
  • 2
OSPFv2 exterior metric type for redistributed routes
nssa_only
boolean
    Choices:
  • no
  • yes
Redistribute to NSSA areas only
preserve_med
boolean
    Choices:
  • no
  • yes
Preserve med of BGP routes
route_policy
dictionary
Apply route-policy to redistribution
name
string
Name of the policy
parameters
list / elements=string
Specify parameter values for the policy
route_type
string
    Choices:
  • application
  • bgp
  • connected
  • dagr
  • eigrp
  • isis
  • mobile
  • ospf
  • rip
  • static
  • subscriber
Route type to redistribute
tag
integer
Set tag for routes redistributed into OSPFv2
retransmit_interval
integer
Delay between LSA retransmissions
router_id
string
OSPFv2 router-id in IPv4 address format (A.B.C.D)
security_ttl
dictionary
Enable security
hops
integer
Maximum number of IP hops allowed <1-254>
set
boolean
    Choices:
  • no
  • yes
Enable ttl security
summary_in
string
    Choices:
  • enable
  • disable
Enable/Disable advertisement of external prefixes as inter-area
summary_prefix
list / elements=dictionary
Configure IP address summaries
not_advertise
boolean
    Choices:
  • no
  • yes
Suppress routes that match the specified prefix/mask pair
prefix
string / required
IP summary address/mask (A.B.C.D/prefix)
tag
integer
Set tag
timers
dictionary
Configure timer related constants
graceful_shutdown
dictionary
Timers for graceful shutdown(cisco-support)
initial_delay
integer
Delay before starting graceful shutdown
retain_routes
integer
Time to keep routes active after graceful shutdown
lsa
dictionary
OSPFv2 global LSA timers
group_pacing
integer
OSPFv2 LSA group pacing timer. Interval between group of LSA being refreshed or maxaged
min_arrival
integer
OSPFv2 MinLSArrival timer. The minimum interval in millisec between accepting the same LSA
refresh
integer
OSPFv2 LSA refresh interval. How often self-originated LSAs should be refreshed, in seconds
pacing_flood
integer
OSPFv2 flood pacing timer. Interval in msec to pace flooding on all interfaces
throttle
dictionary
OSPFv2 throttle timers
fast_reroute
integer
Fast-reroute throttle timer. Delay between end of SPF and start of the fast-reroute computation in milliseconds
lsa_all
dictionary
LSA throttle timers for all types of OSPFv2 LSAs
initial_delay
integer
Delay to generate first occurance of LSA in milliseconds
max_delay
integer
Maximum delay between originating the same LSA in milliseconds
min_delay
integer
Minimum delay between originating the same LSA in milliseconds
spf
dictionary
OSPFv2 SPF throttle timers
change_delay
integer
Delay between receiving a change to SPF calculation in milliseconds
max_wait
integer
Maximum wait time in milliseconds for SPF calculations
second_delay
integer
Delay between first and second SPF calculation in milliseconds
transmit_delay
integer
Estimated time needed to send link-state update packet
weight
integer
Interface weight
running_config
string
This option is used only with state parsed.
The value of this option should be the output received from the IOS-XR device by executing the command show running-config router ospf.
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
  • deleted
  • parsed
  • gathered
  • rendered
  • overridden
The state the configuration should be left in.

Notes

Note

Examples

# Using merged

# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 15:54:44.569 UTC
# % No such configuration item(s)
#

- name: Merge provided OSPFv2 configuration with the existing configuration
  cisco.iosxr.iosxr_ospfv2:
    config:
      processes:
      - process_id: '27'
        areas:
        - area_id: '10'
          hello_interval: 2
          authentication:
            keychain: ansi11393
      - process_id: '26'
        adjacency_stagger:
          max_adjacency: 20
          min_adjacency: 10
      - process_id: '10'
        authentication:
          keychain: ansible_test1102
        areas:
        - area_id: '11'
          default_cost: 5
          cost: 11
        - area_id: 22
          default_cost: 6
      - process_id: '30'
        areas:
        - area_id: 11
          default_cost: 5
        - area_id: 22
          default_cost: 6

        cost: 2
        default_metric: 10
        transmit_delay: 2
        hello_interval: 1
        dead_interval: 2
        retransmit_interval: 2
        weight: 2
        packet_size: 577
        priority: 1
        router_id: 2.2.2.2
        demand_circuit: enable
        passive: disable
        summary_in: enable
        flood_reduction: disable
        mtu_ignore: enable
        external_out: disable
    state: merged

#
#
# ------------------------
# Module Execution Result
# ------------------------
#
#  "before": {}
#
#  "commands": [
#        "router ospf 30",
#        "cost 2",
#        "weight 2",
#        "passive disable",
#        "priority 1",
#        "flood-reduction disable",
#        "default-metric 10",
#        "router-id 2.2.2.2",
#        "demand-circuit enable",
#        "packet-size 577",
#        "transmit-delay 2",
#        "summary-in enable",
#        "external-out disable",
#        "dead-interval 2",
#        "hello-interval 1",
#        "retransmit-interval 2",
#        "mtu-ignore enable",
#        "area 11 default-cost 5",
#        "area 22 default-cost 6",
#        "router ospf 26",
#        "adjacency stagger 10 20",
#        "authentication message-digest keychain ansible1101pass",
#        "router ospf 27",
#        "area 10 authentication keychain ansi11393",
#        "area 10 hello-interval 2",
#        "router ospf 10",
#        "authentication keychain ansible_test1102",
#        "area 11 default-cost 5",
#        "area 11 cost 11",
#        "area 22 default-cost 6"
#    ]
#
#  "after": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }
#
#
# ------------
# After state
# ------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#


# Using replaced
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#

- name: Replace OSPFv2 routes configurations from the device
  cisco.iosxr.iosxr_ospfv2:
    config:
      processes:
      - process_id: 27
        areas:
        - area_id: 10
          hello_interval: 2
        - area_id: 20
          cost: 2
          default_cost: 2
          authentication:
            keychain: ansi11393
      - process_id: 26
        adjacency_stagger:
          min_adjacency: 10
          max_adjacency: 20
    state: replaced

#
#
# ------------------------
# Module Execution Result
# ------------------------
#
#  "before": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }
#
#  "commands": [
#        "router ospf 27",
#        "no area 10 authentication keychain ansi11393",
#        "area 20 authentication keychain ansi11393",
#        "area 20 default-cost 2",
#        "area 20 cost 2"
#    ]
#
#  "after": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "hello_interval": 2
#                    },
#                    {
#                        "area_id": "20",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "cost": 2,
#                        "default_cost": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton(config)#do show running-config router ospf
# Thu Jun 11 16:40:31.038 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#   hello-interval 2
#  !
#  area 20
#   cost 2
#   authentication keychain ansi11393
#   default-cost 2
#  !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#


# Using overridden
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#

- name: Override existing OSPFv2 configurations from the device
  cisco.iosxr.iosxr_ospfv2:
    config:
      processes:
      - process_id: 27
        areas:
        - area_id: 10
          hello_interval: 2
          authentication:
            keychain: ansi11393
        - area_id: 20
          cost: 2
          default_cost: 2
          authentication:
            keychain: ansi11393
      - process_id: 26
        adjacency_stagger:
          min_adjacency: 10
          max_adjacency: 20
    state: overridden

#
#
# ------------------------
# Module Execution Result
# ------------------------
#
#  "before": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }
#
#  "commands": [
#        "router ospf 10",
#        "no authentication keychain ansible_test1102",
#        "no area 11 default-cost 5",
#        "no area 11 cost 11",
#        "no area 22 default-cost 6",
#        "router ospf 30",
#        "no cost 2",
#        "no weight 2",
#        "no passive disable",
#        "no priority 1",
#        "no flood-reduction disable",
#        "no default-metric 10",
#        "no router-id 2.2.2.2",
#        "no demand-circuit enable",
#        "no packet-size 577",
#        "no transmit-delay 2",
#        "no summary-in enable",
#        "no external-out disable",
#        "no dead-interval 2",
#        "no hello-interval 1",
#        "no retransmit-interval 2",
#        "no mtu-ignore enable",
#        "no area 11 default-cost 5",
#        "no area 22 default-cost 6",
#        "router ospf 27",
#        "area 20 authentication keychain ansi11393",
#        "area 20 default-cost 2",
#        "area 20 cost 2"
#    ]
#
#  "after": {
#        "processes": [
#            {
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    },
#                    {
#                        "area_id": "20",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "cost": 2,
#                        "default_cost": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "process_id": "30"
#            }
#        ]
#    }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:50:36.332 UTC
# router ospf 10
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#   authentication keychain ansi11393
#   hello-interval 2
#  !
#  area 20
#   cost 2
#   authentication keychain ansi11393
#   default-cost 2
#  !
# !
# router ospf 30
# !
#


# Using deleted
#
# ------------
# Before state
# ------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#

- name: Deleted existing OSPFv2 configurations from the device
  cisco.iosxr.iosxr_ospfv2:
    config:
      processes:
      - process_id: '10'
      - process_id: '26'
      - process_id: '27'
      - process_id: '30'
    state: deleted

#
#
# ------------------------
# Module Execution Result
# ------------------------
#
#  "before": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    },
#
#  "commands": [
#        "router ospf 10",
#        "no authentication keychain ansible_test1102",
#        "no area 11 default-cost 5",
#        "no area 11 cost 11",
#        "no area 22 default-cost 6",
#        "router ospf 26",
#        "no adjacency stagger 10 20",
#        "no authentication message-digest keychain ansible1101pass",
#        "router ospf 27",
#        "no area 10 authentication keychain ansi11393",
#        "no area 10 hello-interval 2",
#        "router ospf 30",
#        "no cost 2",
#        "no weight 2",
#        "no passive disable",
#        "no priority 1",
#        "no flood-reduction disable",
#        "no default-metric 10",
#        "no router-id 2.2.2.2",
#        "no demand-circuit enable",
#        "no packet-size 577",
#        "no transmit-delay 2",
#        "no summary-in enable",
#        "no external-out disable",
#        "no dead-interval 2",
#        "no hello-interval 1",
#        "no retransmit-interval 2",
#        "no mtu-ignore enable",
#        "no area 11 default-cost 5",
#        "no area 22 default-cost 6"
#    ]
#
#  "after": {
#        "processes": [
#            {
#                "process_id": "10"
#            },
#            {
#                "process_id": "26"
#            },
#            {
#                "process_id": "27"
#            },
#            {
#                "process_id": "30"
#            }
#        ]
#    }
#
#
# -----------
# After state
# -----------
#
# RP/0/RP0/CPU0:anton(config)#show running-config router ospf
# Thu Jun 11 17:07:34.218 UTC
# router ospf 10
# !
# router ospf 26
# !
# router ospf 27
# !
# router ospf 30
# !


# Using parsed
# parsed.cfg
# ------------
# Thu Jun 11 17:28:51.918 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#   authentication keychain ansi11393
#   hello-interval 2
#  !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
- name: Parsed the device configuration to get output commands
  cisco.iosxr.iosxr_ospfv2:
    running_config: "{{ lookup('file', './parsed.cfg') }}"
    state: parsed
#
#
# -------------------------
# Module Execution Result
# -------------------------
#
#
# "parsed": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }



# Using rendered
#
#
- name: Render the commands for provided  configuration
  cisco.iosxr.iosxr_ospfv2:
    config:
      processes:
      - process_id: 27
        areas:
        - area_id: 10
          hello_interval: 2
          authentication:
            keychain: ansi11393
      - process_id: 26
        adjacency_stagger:
          min_adjacency: 10
          max_adjacency: 20
      - process_id: 10
        authentication:
          keychain: ansible_test1102
        areas:
        - area_id: 11
          default_cost: 5
          cost: 11
        - area_id: 22
          default_cost: 6
      - process_id: 30
        areas:
        - area_id: 11
          default_cost: 5
        - area_id: 22
          default_cost: 6

        cost: 2
        default_metric: 10
        transmit_delay: 2
        hello_interval: 1
        dead_interval: 2
        retransmit_interval: 2
        weight: 2
        packet_size: 577
        priority: 1
        router_id: 2.2.2.2
        demand_circuit: enable
        passive: disable
        summary_in: enable
        flood_reduction: disable
        mtu_ignore: enable
        external_out: disable
    state: rendered

#
#
# -------------------------
# Module Execution Result
# -------------------------
#
#
# "rendered": [
#        "router ospf 27",
#        "area 10 authentication keychain ansi11393",
#        "area 10 hello-interval 2",
#        "router ospf 26",
#        "adjacency stagger 10 20",
#        "authentication message-digest keychain ansible1101pass",
#        "router ospf 10",
#        "authentication keychain ansible_test1102",
#        "area 11 default-cost 5",
#        "area 11 cost 11",
#        "area 22 default-cost 6",
#        "router ospf 30",
#        "cost 2",
#        "weight 2",
#        "passive disable",
#        "priority 1",
#        "flood-reduction disable",
#        "default-metric 10",
#        "router-id 2.2.2.2",
#        "demand-circuit enable",
#        "packet-size 577",
#        "transmit-delay 2",
#        "summary-in enable",
#        "external-out disable",
#        "dead-interval 2",
#        "hello-interval 1",
#        "retransmit-interval 2",
#        "mtu-ignore enable",
#        "area 11 default-cost 5",
#        "area 22 default-cost 6"
#    ]


# Using gathered
#
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
#  router-id 2.2.2.2
#  summary-in enable
#  external-out disable
#  cost 2
#  packet-size 577
#  weight 2
#  passive disable
#  priority 1
#  mtu-ignore enable
#  flood-reduction disable
#  dead-interval 2
#  retransmit-interval 2
#  demand-circuit enable
#  hello-interval 1
#  transmit-delay 2
#  default-metric 10
#  area 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
#
- name: Gather ospfv2 routes configuration
  cisco.iosxr.iosxr_ospfv2:
    state: gathered
#
#
# -------------------------
# Module Execution Result
# -------------------------
#
#    "gathered": {
#        "processes": [
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "cost": 11,
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "authentication": {
#                    "keychain": "ansible_test1102"
#                },
#                "process_id": "10"
#            },
#            {
#                "adjacency_stagger": {
#                    "max_adjacency": 20,
#                    "min_adjacency": 10
#                },
#                "authentication": {
#                    "message_digest": {
#                        "keychain": "ansible1101pass"
#                    }
#                },
#                "process_id": "26"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "10",
#                        "authentication": {
#                            "keychain": "ansi11393"
#                        },
#                        "hello_interval": 2
#                    }
#                ],
#                "process_id": "27"
#            },
#            {
#                "areas": [
#                    {
#                        "area_id": "11",
#                        "default_cost": 5
#                    },
#                    {
#                        "area_id": "22",
#                        "default_cost": 6
#                    }
#                ],
#                "cost": 2,
#                "dead_interval": 2,
#                "default_metric": 10,
#                "demand_circuit": "enable",
#                "external_out": "disable",
#                "flood_reduction": "disable",
#                "hello_interval": 1,
#                "mtu_ignore": "enable",
#                "packet_size": 577,
#                "passive": "disable",
#                "priority": 1,
#                "process_id": "30",
#                "retransmit_interval": 2,
#                "router_id": "2.2.2.2",
#                "summary_in": "enable",
#                "transmit_delay": 2,
#                "weight": 2
#            }
#        ]
#    }
#
# After state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
#  authentication keychain ansible_test1102
#  area 11
#   cost 11
#   default-cost 5
#  !
#  area 22
#   default-cost 6
#  !
# !
# router ospf 26
#  authentication message-digest keychain ansible1101pass
#  adjacency stagger 10 20
# !
# router ospf 27
#  area 10
#  authentication keychain ansi11393
#   hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
#  default-cost 5
# !
# area 22
#  default-cost 6
# !
# !
#
#

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:
['router ospf 30', "authentication message-digest keychain 'ansible1101pass'"]


Authors

  • Rohit Thakur (@rohitthakur2590)