forked from network-evolution/Ansible-Playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10_ios_static_route.yml
46 lines (44 loc) · 1.3 KB
/
10_ios_static_route.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: IOS Static Route Demo
hosts: routers_ssh_pass
tasks:
################### IP Config Merged ##############
- name: Config Static Route1
ios_static_route:
prefix: 10.1.1.0
mask: 255.255.255.0
next_hop: 192.168.0.1
state: present
register: route1
- debug:
var: route1.commands
################### IP Config Merged ##############
- name: Config Static Route2
ios_static_route:
prefix: 10.1.2.0
mask : 255.255.255.0
interface: GigabitEthernet0/1
state: present
register: route2
- debug:
var: route2.commands
################### IP Config Aggregate ##############
- name: Config Static Route3
ios_static_route:
aggregate:
- { prefix: 10.1.3.0, mask : 255.255.255.0, interface: GigabitEthernet0/1}
- { prefix: 10.1.4.0, mask : 255.255.255.0, interface: GigabitEthernet0/1}
state: present
register: route3
- debug:
var: route3.commands
################### IP Route Delete##############
- name: Remove static Route
ios_static_route:
prefix: 10.1.2.0
mask : 255.255.255.0
interface: GigabitEthernet0/1
state: absent
register: route2
- debug:
var: route2.commands