From c95f012ff6daf7a0dd892b28a4e656cb8b919f2a Mon Sep 17 00:00:00 2001 From: yanzhangi <51999930+yanzhangi@users.noreply.github.com> Date: Sat, 12 Oct 2019 23:42:51 +0800 Subject: [PATCH] [Backport/2.9/61442]Update ce_mtu to fix bugs (#62684) * Update ce_mtu to fix bugs (cherry picked from commit cb8a3a4c06cdddad4f77558a95d39d4800470934) * Update ce_mtu modified information --- changelogs/fragments/61442-ce_mtu-to-fix-bugs.yml | 2 ++ lib/ansible/modules/network/cloudengine/ce_mtu.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/61442-ce_mtu-to-fix-bugs.yml diff --git a/changelogs/fragments/61442-ce_mtu-to-fix-bugs.yml b/changelogs/fragments/61442-ce_mtu-to-fix-bugs.yml new file mode 100644 index 00000000000..2812aef89fc --- /dev/null +++ b/changelogs/fragments/61442-ce_mtu-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_mtu- update to fix some bugs - Contrast before and after adding configuration. (https://github.com/ansible/ansible/pull/61442) diff --git a/lib/ansible/modules/network/cloudengine/ce_mtu.py b/lib/ansible/modules/network/cloudengine/ce_mtu.py index f63c32c62a7..7d037cf7e70 100644 --- a/lib/ansible/modules/network/cloudengine/ce_mtu.py +++ b/lib/ansible/modules/network/cloudengine/ce_mtu.py @@ -534,6 +534,8 @@ class Mtu(object): else: self.end_state[ "jumboframe"] = "jumboframe enable %s %s" % (self.jbf_max, 1518) + if self.end_state == self.existing: + self.changed = False def work(self): """worker"""