diff --git a/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml b/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml new file mode 100644 index 00000000000..1ad14e555fa --- /dev/null +++ b/changelogs/fragments/60274-ce_acl-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_acl - update to fix some bugs - When the frag_type parameter is in the module and the configuration is repeatedly sent to the device, the module displays change = True. (https://github.com/ansible/ansible/pull/60274) diff --git a/lib/ansible/modules/network/cloudengine/ce_acl.py b/lib/ansible/modules/network/cloudengine/ce_acl.py index 0968f414801..4885c34320d 100644 --- a/lib/ansible/modules/network/cloudengine/ce_acl.py +++ b/lib/ansible/modules/network/cloudengine/ce_acl.py @@ -650,7 +650,8 @@ class BaseAcl(object): find_flag = False if self.src_wild and tmp.get("aclSrcWild") != self.src_wild: find_flag = False - if self.frag_type and tmp.get("aclFragType") != self.frag_type: + frag_type = "clear_fragment" if tmp.get("aclFragType") is None else tmp.get("aclFragType") + if self.frag_type and frag_type != self.frag_type: find_flag = False if self.vrf_name and tmp.get("vrfName") != self.vrf_name: find_flag = False