diff --git a/lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py b/lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py index 1cd6c91c9a4..72d1d985052 100644 --- a/lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py +++ b/lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py @@ -286,12 +286,12 @@ class VxlanArp(object): """get current configuration""" flags = list() - exp = "| ignore-case section include evn bgp|host collect protocol bgp" + exp = r"| ignore-case section include evn bgp|host collect protocol bgp" if self.vbdif_name: - exp += "|^interface %s$" % self.vbdif_name + exp += r"|^#\s+interface %s\s+" % self.vbdif_name.lower().capitalize().replace(" ", "") if self.bridge_domain_id: - exp += "|^bridge-domain %s$" % self.bridge_domain_id + exp += r"|^#\s+bridge-domain %s\s+" % self.bridge_domain_id flags.append(exp) cfg_str = self.get_config(flags)