Skip to content

Instantly share code, notes, and snippets.

@NilashishC
Created April 17, 2020 08:20
Show Gist options
  • Save NilashishC/a8f61d54b4b965ac45774be789c7f914 to your computer and use it in GitHub Desktop.
Save NilashishC/a8f61d54b4b965ac45774be789c7f914 to your computer and use it in GitHub Desktop.
---
- hosts: nxos
gather_facts: no
tasks:
- name: Deleted
cisco.nxos.nxos_ospfv2:
state: deleted
tags:
- deleted
- name: Merged
cisco.nxos.nxos_ospfv2:
config: &merged
processes:
- process_id: 102
router_id: 198.54.100.1
shutdown: True
- process_id: 100
router_id: 192.0.100.1
areas:
- area_id: 0.0.0.100
authentication:
message_digest: True
filter_list:
- route_map: rmap_1
direction: in
- route_map: rmap_2
direction: out
ranges:
- prefix: 192.0.2.0/24
not_advertise: True
- prefix: 192.0.3.0/24
cost: 120
- area_id: 0.0.0.101
nssa:
no_summary: True
no_redistribution: True
- area_id: 0.0.0.102
stub:
no_summary: True
redistribute:
- protocol: eigrp
id: 120
route_map: rmap_1
- protocol: direct
route_map: ospf-direct-connect
vrfs:
- vrf: zone1
router_id: 192.0.100.2
areas:
- area_id: 0.0.100.1
nssa:
no_summary: True
no_redistribution: True
redistribute:
- protocol: static
route_map: zone1-direct-connect
summary_address:
- prefix: 10.0.0.0/24
tag: 120
- prefix: 11.0.0.0/24
not_advertise: True
- vrf: zone2
shutdown: True
down_bit_ignore: True
capability:
vrf_lite:
evpn: True
auto_cost:
reference_bandwidth: 45
unit: Gbps
state: merged
tags:
- merged
- name: Replaced
cisco.nxos.nxos_ospfv2:
config: &replaced
processes:
- process_id: 102
router_id: 192.0.1.1
vrfs:
- vrf: zone2
summary_address:
- prefix: 192.0.8.0/24
tag: 120
- vrf: zone4
shutdown: True
state: replaced
register: result
tags:
- replaced
- name: Overridden
cisco.nxos.nxos_ospfv2:
config: *replaced
state: overridden
tags:
- overridden
- name: Deleted
cisco.nxos.nxos_ospfv2:
config:
processes:
- process_id: 102
state: deleted
tags:
- deleted_single
- name: Rendered
cisco.nxos.nxos_ospfv2:
config: *merged
state: rendered
tags:
- rendered
- name: Parsed
cisco.nxos.nxos_ospfv2:
running_config: "{{ lookup('file', 'ospfv2.txt') }}"
state: parsed
tags:
- parsed
- name: Gathered
cisco.nxos.nxos_ospfv2:
state: gathered
tags:
- gathered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment