Skip to content

Instantly share code, notes, and snippets.

@NilashishC
Created November 21, 2019 13:57
Show Gist options
  • Save NilashishC/a0564383e5e07000f2d2f04b27c17fed to your computer and use it in GitHub Desktop.
Save NilashishC/a0564383e5e07000f2d2f04b27c17fed to your computer and use it in GitHub Desktop.
---
- hosts: iosxr_local
gather_facts: no
tasks:
- iosxr_facts:
gather_subset: min
gather_network_resources:
- static_routes
tags:
- facts
- iosxr_static_routes:
state: deleted
tags:
- nuke
- iosxr_static_routes:
config:
- vrf: blue
- vrf: red
address_families:
- afi: ipv4
safi: unicast
routes:
- dest: 15.0.0.0/8
- address_families:
- afi: ipv4
safi: multicast
routes:
- dest: 11.0.0.0/8
state: deleted
tags:
- deleted
- iosxr_static_routes:
config:
- vrf: blue
address_families:
- afi: ipv4
safi: unicast
routes:
- dest: 9.0.0.0/8
next_hops:
- interface: FastEthernet0/0/0/11
- address_families:
- afi: ipv4
safi: unicast
routes:
- dest: 10.0.0.0/8
next_hops:
- forward_router_address: 192.168.1.100
admin_distance: 120
tag: 11
- afi: ipv4
safi: multicast
routes:
- dest: 11.0.0.0/8
next_hops:
- interface: FastEthernet0/0/0/8
- interface: FastEthernet0/0/0/2
forward_router_address: 192.168.1.101
- dest: 12.0.0.0/8
next_hops:
- dest_vrf: test_1
admin_distance: 120
- vrf: red
address_families:
- afi: ipv4
safi: unicast
routes:
- dest: 14.0.0.0/8
next_hops:
- forward_router_address: 192.168.1.101
track: mon
- dest: 15.0.0.0/8
next_hops:
- forward_router_address: 192.168.1.101
description: VRF_RED_ROUTE
state: merged
tags:
- merged
- iosxr_static_routes:
state: gathered
tags:
- gathered
- iosxr_static_routes:
config:
- vrf: red
address_families:
- afi: ipv4
safi: unicast
routes:
- dest: 14.0.0.0/8
next_hops:
- interface: 192.168.1.101
state: rendered
tags:
- rendered
- iosxr_static_routes:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
tags:
- parsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment