Closed netexgb closed 1 year ago
In order to check how wrong I configured the ansible playbook, I configured in the router the ACL I need:
ip access-list extended QoS_Cloud_Nasuni
10 permit tcp object-group QoS_Cloud_Nasuni_On-Premises object-group QoS_Cloud_Nasuni_Cloud eq 445
20 permit tcp object-group QoS_Cloud_Nasuni_On-Premises object-group QoS_Cloud_Nasuni_Cloud eq 443
30 permit tcp object-group QoS_Cloud_Nasuni_On-Premises object-group QoS_Cloud_Nasuni_Cloud eq 139
Then I gathered the configuration from the router and parsed it into YAML, using the following playbook:
---
- name: Access List Parsing
hosts:
- be2012
gather_facts: True
tasks:
- name: Gather the Access List Configuration in the router
# when: inventory_hostname == "us1896-atlanta3-internet-cs.mgmt.slb.net"
cisco.ios.ios_acls:
state: gathered
register: acls
- name: Write ACLs configuration to a file
ansible.builtin.copy:
content: "{{ {'acls': acls['gathered']} | to_nice_yaml }}"
dest: "acls_gathered.yaml"
And interestingly I got the following about the ACL that has the object groups:
acls:
- acls:
- {}
acl_type: extended
name: QoS_Cloud_Nasuni
'''
Notice the {} denoting a dictionary.
I'm getting the same output. Any fix for this?
The Cisco device I'm working with is a 3850 running 16.6.6
TASK [acl : Merge provided configuration with device configuration] fatal: [lab-3850.company.org]: FAILED! => changed=false module_stderr: 'unhashable type: ''dict''' module_stdout: '' msg: |- MODULE FAILURE See stdout/stderr for the exact error
SUMMARY
When implement a playbook using the cisco.ios.ios_acls I get the following error:
ISSUE TYPE
COMPONENT NAME
cisco.ios.ios_acls
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS