cisco.ios.ios_ospfv3 – OSPFv3 resource module¶
Note
This plugin is part of the cisco.ios collection (version 1.3.0).
To install it use: ansible-galaxy collection install cisco.ios
.
To use it in a playbook, specify: cisco.ios.ios_ospfv3
.
New in version 1.1.0: of cisco.ios
Synopsis¶
This module configures and manages the Open Shortest Path First (OSPF) version 3 on IOS platforms.
Parameters¶
Examples¶
# Using deleted
# Before state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Delete provided OSPF V3 processes
cisco.ios.ios_ospfv3:
config:
processes:
- process_id: 1
state: deleted
# Commands Fired:
# ---------------
#
# "commands": [
# "no router ospfv3 1"
# ]
# After state:
# -------------
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
# Using deleted without any config passed (NOTE: This will delete all OSPFV3 configuration from device)
# Before state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Delete all OSPF processes
cisco.ios.ios_ospfv3:
state: deleted
# Commands Fired:
# ---------------
#
# "commands": [
# "no router ospfv3 200",
# "no router ospfv3 1"
# ]
# After state:
# -------------
# router-ios#sh running-config | section ^router ospfv3
# router-ios#
# Using merged
# Before state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router-ios#
- name: Merge provided OSPFV3 configuration
cisco.ios.ios_ospfv3:
config:
processes:
- process_id: 1
max_metric:
router_lsa: true
on_startup:
time: 110
address_family:
- afi: ipv4
unicast: true
vrf: blue
adjacency:
min_adjacency: 50
max_adjacency: 50
areas:
- area_id: 25
nssa:
default_information_originate:
metric: 25
nssa_only: true
areas:
- area_id: "10"
nssa:
default_information_originate:
metric: 10
timers:
throttle:
lsa:
first_delay: 12
min_delay: 14
max_delay: 16
- process_id: 200
address_family:
- afi: ipv4
unicast: true
adjacency:
min_adjacency: 200
max_adjacency: 200
max_metric:
router_lsa: true
on_startup:
time: 100
auto_cost:
reference_bandwidth: 4
state: merged
# Commands Fired:
# ---------------
#
# "commands": [
# "router ospfv3 1",
# "max-metric router-lsa on-startup 110",
# "area 10 nssa default-information-originate metric 10",
# "address-family ipv4 unicast vrf blue",
# "adjacency stagger 50 50",
# "area 25 nssa default-information-originate metric 25 nssa-only",
# "exit-address-family",
# "router ospfv3 200",
# "auto-cost reference-bandwidth 4",
# "max-metric router-lsa on-startup 100",
# "address-family ipv4 unicast",
# "adjacency stagger 200 200",
# "exit-address-family"
# ]
# After state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
# Using overridden
# Before state:
# -------------
#
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Override provided OSPFV3 configuration
cisco.ios.ios_ospfv3:
config:
processes:
- process_id: 200
max_metric:
router_lsa: true
on_startup:
time: 200
address_family:
- afi: ipv4
unicast: true
adjacency:
min_adjacency: 50
max_adjacency: 50
areas:
- area_id: 200
nssa:
default_information_originate:
metric: 200
nssa_only: true
areas:
- area_id: "10"
nssa:
default_information_originate:
metric: 10
state: overridden
# Commands Fired:
# ---------------
#
# "commands": [
# "no router ospfv3 1",
# "router ospfv3 200",
# "no auto-cost reference-bandwidth 4",
# "max-metric router-lsa on-startup 200",
# "area 10 nssa default-information-originate metric 10",
# "address-family ipv4 unicast",
# "adjacency stagger 50 50",
# "area 200 nssa default-information-originate metric 200 nssa-only",
# "exit-address-family"
# ]
# After state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 200
# max-metric router-lsa on-startup 200
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast
# adjacency stagger 50 50
# area 200 nssa default-information-originate metric 200 nssa-only
# exit-address-family
# Using replaced
# Before state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Replaced provided OSPFV3 configuration
cisco.ios.ios_ospfv3:
config:
processes:
- process_id: 200
max_metric:
router_lsa: true
on_startup:
time: 200
address_family:
- afi: ipv4
unicast: true
adjacency:
min_adjacency: 50
max_adjacency: 50
areas:
- area_id: 200
nssa:
default_information_originate:
metric: 200
nssa_only: true
areas:
- area_id: "10"
nssa:
default_information_originate:
metric: 10
state: replaced
# Commands Fired:
# ---------------
# "commands": [
# "router ospfv3 200",
# "no auto-cost reference-bandwidth 4",
# "max-metric router-lsa on-startup 200",
# "area 10 nssa default-information-originate metric 10",
# "address-family ipv4 unicast",
# "adjacency stagger 50 50",
# "area 200 nssa default-information-originate metric 200 nssa-only",
# "exit-address-family"
# ]
# After state:
# -------------
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 200
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast
# adjacency stagger 50 50
# area 200 nssa default-information-originate metric 200 nssa-only
# exit-address-family
# Using Gathered
# Before state:
# -------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Gather OSPFV3 provided configurations
cisco.ios.ios_ospfv3:
config:
state: gathered
# Module Execution Result:
# ------------------------
#
# "gathered": {
# "processes": [
# {
# "address_family": [
# {
# "adjacency": {
# "max_adjacency": 50,
# "min_adjacency": 50
# },
# "afi": "ipv4",
# "areas": [
# {
# "area_id": "25",
# "nssa": {
# "default_information_originate": {
# "metric": 25,
# "nssa_only": true
# }
# }
# }
# ],
# "unicast": true,
# "vrf": "blue"
# }
# ],
# "areas": [
# {
# "area_id": "10",
# "nssa": {
# "default_information_originate": {
# "metric": 10
# }
# }
# }
# ],
# "max_metric": {
# "on_startup": {
# "time": 110
# },
# "router_lsa": true
# },
# "process_id": 1
# },
# {
# "address_family": [
# {
# "adjacency": {
# "max_adjacency": 200,
# "min_adjacency": 200
# },
# "afi": "ipv4",
# "unicast": true
# }
# ],
# "auto_cost": {
# "reference_bandwidth": 4
# },
# "max_metric": {
# "on_startup": {
# "time": 100
# },
# "router_lsa": true
# },
# "process_id": 200
# }
# ]
# }
# After state:
# ------------
#
# router-ios#sh running-config | section ^router ospfv3
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
# Using Rendered
- name: Render the commands for provided configuration
cisco.ios.ios_ospfv3:
config:
processes:
- process_id: 1
max_metric:
router_lsa: true
on_startup:
time: 110
address_family:
- afi: ipv4
unicast: true
vrf: blue
adjacency:
min_adjacency: 50
max_adjacency: 50
areas:
- area_id: 25
nssa:
default_information_originate:
metric: 25
nssa_only: true
areas:
- area_id: "10"
nssa:
default_information_originate:
metric: 10
timers:
throttle:
lsa:
first_delay: 12
min_delay: 14
max_delay: 16
- process_id: 200
address_family:
- afi: ipv4
unicast: true
adjacency:
min_adjacency: 200
max_adjacency: 200
max_metric:
router_lsa: true
on_startup:
time: 100
auto_cost:
reference_bandwidth: 4
state: rendered
# Module Execution Result:
# ------------------------
#
# "rendered": [
# "router ospfv3 1",
# "max-metric router-lsa on-startup 110",
# "area 10 nssa default-information-originate metric 10",
# "address-family ipv4 unicast vrf blue",
# "adjacency stagger 50 50",
# "area 25 nssa default-information-originate metric 25 nssa-only",
# "exit-address-family",
# "router ospfv3 200",
# "auto-cost reference-bandwidth 4",
# "max-metric router-lsa on-startup 100",
# "address-family ipv4 unicast",
# "adjacency stagger 200 200",
# "exit-address-family"
# ]
# Using Parsed
# File: parsed.cfg
# ----------------
#
# router ospfv3 1
# max-metric router-lsa on-startup 110
# area 10 nssa default-information-originate metric 10
# !
# address-family ipv4 unicast vrf blue
# adjacency stagger 50 50
# area 25 nssa default-information-originate metric 25 nssa-only
# exit-address-family
# router ospfv3 200
# max-metric router-lsa on-startup 100
# auto-cost reference-bandwidth 4
# !
# address-family ipv4 unicast
# adjacency stagger 200 200
# exit-address-family
- name: Parse the provided configuration with the exisiting running configuration
cisco.ios.ios_ospfv3:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
#
# "parsed": {
# "processes": [
# {
# "address_family": [
# {
# "adjacency": {
# "max_adjacency": 50,
# "min_adjacency": 50
# },
# "afi": "ipv4",
# "areas": [
# {
# "area_id": "25",
# "nssa": {
# "default_information_originate": {
# "metric": 25,
# "nssa_only": true
# }
# }
# }
# ],
# "unicast": true,
# "vrf": "blue"
# }
# ],
# "areas": [
# {
# "area_id": "10",
# "nssa": {
# "default_information_originate": {
# "metric": 10
# }
# }
# }
# ],
# "max_metric": {
# "on_startup": {
# "time": 110
# },
# "router_lsa": true
# },
# "process_id": 1
# }
# ]
# }
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Sumit Jaiswal (@justjais)