summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
index e2a25e32..b7bff53e 100644
--- a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
+++ b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
@@ -373,6 +373,8 @@ class Firewall_global(ConfigBase):
)
elif not opr and key in l_set:
if key == "name" and self._is_grp_del(h, want, key):
+ if commands[-1] == cmd + " " + want["name"] + " " + self._grp_type(attr):
+ commands.pop()
commands.append(cmd + " " + want["name"])
continue
if not (h and in_target_not_none(h, key)) and not self._is_grp_del(h, want, "name"):
@@ -435,6 +437,14 @@ class Firewall_global(ConfigBase):
+ " "
+ member[self._get_mem_type(type)],
)
+ elif not opr and not have:
+ commands.append(
+ cmd
+ + " "
+ + name
+ + " "
+ + self._grp_type(type),
+ )
return commands
def _get_mem_type(self, group):