Files
ansible/cisco_test.yml
2024-07-12 12:58:40 +02:00

39 lines
973 B
YAML

---
- name: test connection and automation for cisco acl
# ansible_connection: ansible.netcommon.network_cli
# ansible_network_os: cisco.ios.ios
# ansible_user: "{{USERNAME}}"
# ansible_password: "{{PASSWORD}}"
# ansible_become: yes
# ansible_become_method: enable
# ansible_become_password: "{{BECOME_PASSWORD}}"
hosts: all
tasks:
# - name: Backup current switch config (ios)
# cisco.ios.ios_config:
# backup: yes
# register: backup_ios_location
# when: ansible_network_os == 'cisco.ios.ios'
- name: Gather all legacy facts
cisco.ios.ios_facts:
gather_subset: all
register: ios_info
- name: output info
debug:
var: "ios_info"
- name: test interface acl ip_configuration
cisco.ios.ios_acl_interfaces:
config:
- name: GigabitEthernet 1/0/10
access_groups:
- afi: ipv4
acls:
- name: PG_to_PLC2
direction: in
state: merged