mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-23 01:19:08 -07:00
nxos_acl: some platforms/versions raise when no ACLs are present (#55609)
* `nxos_acl` may fail with `IndexError: list index out of range` while attempting to delete a non-existent ACL. The failure occurs when the `acl` var is an empty list. * nxos_acl: catch 501 'Structured output unsupported' when no ACLs present With some older image versions, `show ip access-list | json` will raise a 501 error indicating `'Structured output unsupported'` when there are no access-lists configured. This change turns off the `check_rc` and then looks for the failure condition. * Fix kwarg * Fix lint issues
This commit is contained in:
parent
24a46deef5
commit
869fdcd7d4
2 changed files with 11 additions and 7 deletions
|
@ -4,7 +4,7 @@
|
|||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: time_range="ans-range"
|
||||
when: not (platform is match("N5K")) and not (platform is match("N35"))
|
||||
when: platform is not search('N35|N5K|N6K')
|
||||
|
||||
- name: "Setup: Cleanup possibly existing acl."
|
||||
nxos_acl: &remove
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue