Answer the question
In order to leave comments, you need to log in
How to distribute access-lists with unique ip to a large number of routers?
Good afternoon. Actually the question is: How to distribute access-lists with unique ip to a large number of routers?
Let me explain here an example of a playbook
- name: test
hosts: 1.1.1.1
gather_facts: false
connection: local
tasks:
- name: ip access-list extended FIREWALL-ISP1
ios_config:
lines:
- ip access-list extended FIREWALL-ISP1
- 5 permit udp host 2.2.2.2 host 3.3.3.3 eq isakmp
- 6 permit esp host 2.2.2.2 host 3.3.3.3
- 7 permit udp host 2.2.2.2 host 3.3.3.3 eq non500-isakmp
- 8 permit tcp host 2.2.2.2 host 3.3.3.3 eq 22
parents: ip access-list extended FIREWALL-ISP1
match: exact
- name: test
hosts: 15.15.15.15
gather_facts: false
connection: local
tasks:
- name: ip access-list extended FIREWALL-ISP1
ios_config:
lines:
- ip access-list extended FIREWALL-ISP1
- 5 permit udp host 4.4.4.4 host 5.5.5.5 eq isakmp
- 6 permit esp host 4.4.4.4 host 5.5.5.5
- 7 permit udp host 4.4.4.4 host 5.5.5.5 eq non500-isakmp
- 8 permit tcp host 4.4.4.4 host 5.5.5.5 eq 22
parents: ip access-list extended FIREWALL-ISP1
match: exact
Answer the question
In order to leave comments, you need to log in
hosts is a list. Or a group. Or a list of groups
But if your sheets are different for everyone, then it’s better to prepare them with separate files
lines in this case you can do it through lookup (file
Tamura , Here is an example.
hosts
[F11]
172.17.8.111
172.17.8.112
172.17.8.113
[F12]
172.17.8.121
172.17.8.122
172.17.8.125
[FOXGATE]
172.17.8.201
172.17.8.203
172.17.8.9
[SW-TEST]
10.100.0.7
[SW-CR01]
172.17.8.1
[SW-ALL]
172.17.8.91
172.17.8.92
172.17.8.93
172.17.8.81
name: DEPLOY SWITCHS CONFIG
hosts: "{{ host }}"
tasks:
- name: ACCESS-LIST-BGP WIFI PORT
tags: AC-BGP
ios_config:
lines:
- ip access-list extended FIREWALL-ISP1
- 5 permit udp host 2.2.2.2 host 3.3.3.3 eq isakmp
- 6 permit esp host 2.2.2.2 host 3.3.3.3
- 7 permit udp host 2.2.2.2 host 3.3.3.3 eq non500-isakmp
- 8 permit tcp host 2.2.2.2 host 3.3.3.3 eq 22
parents: ip access-list extended FIREWALL-ISP1
match: exact
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question