After completing this section, you should be able to create an ACL on a Cisco IOS device.
On IOS devices, ACLs are used to control access to services.
This playbook creates a MGMT-ACCESS ACL, which can then be associated with SNMP or SSH, for instance.
---
- name: A play that creates a management access ACL
hosts: ios
gather_facts: no
tasks:
- name: create a standard ACL
ios_config:
lines:
# each of the following two items consist of a single line
# with no line breaks
- 10 permit {{ workstation_ipv4 | ipaddr('address') }} {{ workstation_ipv4 | ipaddr('wildcard') }} log
- 20 permit {{ tower_ipv4 | ipaddr('address') }} {{ tower_ipv4 | ipaddr('wildcard') }} log
parents: ["access-list standard 1"]
before: ["no access-list standard 1"]
match: exactClick CREATE to build all of the virtual machines needed for the classroom lab environment. This may take several minutes to complete. Once created the environment can then be stopped and restarted to pause your experience.
If you DELETE your lab, you will remove all of the virtual machines in your classroom and lose all of your progress.