Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong parsing of ace if object-group has dots #238

Open
rulev opened this issue Jun 14, 2024 · 0 comments · May be fixed by #239
Open

Wrong parsing of ace if object-group has dots #238

rulev opened this issue Jun 14, 2024 · 0 comments · May be fixed by #239
Labels
has_pr This issue has an associated PR.

Comments

@rulev
Copy link

rulev commented Jun 14, 2024

SUMMARY

If an ACE has an object group as a source and that object group has dot(s) in its name, that's wrongly parsed as if there is a netmask. That leads to that ACE always considered changed.

ISSUE TYPE
  • Bug Report

There obviously is a mistake here:

--- a/plugins/module_utils/network/asa/rm_templates/acls.py
+++ b/plugins/module_utils/network/asa/rm_templates/acls.py
@@ -186,7 +186,7 @@ class AclsTemplate(NetworkTemplate):
                                         not in source and 'object-group' not in source %}{{ source.split(' ')[0] }}{% elif source is defined and\
                                             '::' in source and 'host' not in source %}{{ source }}{% endif %}",
                                     "netmask": "{{ source.split(' ')[1] if source\
-                                        is defined and '.' in source and 'host' not in source else None and 'object-group' not in source }}",
+                                        is defined and '.' in source and 'host' not in source and 'object-group' not in source else None }}",
                                     "any4": "{{ True if source is defined and source == 'any4' else None }}",
                                     "any6": "{{ True if source is defined and source == 'any6' else None }}",
                                     "any": "{{ True if source is defined and source == 'any' else None }}",
@rulev rulev linked a pull request Jun 14, 2024 that will close this issue
@KB-perByte KB-perByte added the has_pr This issue has an associated PR. label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr This issue has an associated PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants