Backport/2.8/55218 (#58639)
* "no macro" command should not be handled by edit_macro(), fixes #55212
(cherry picked from commit 2cdab1379f
)
* fixed ios_config issue where the "no macro" command was erroneously handled by edit_macro()
This commit is contained in:
parent
7e8b81ae18
commit
db7c82ea21
2 changed files with 5 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ios_config - fixed issue where the "no macro" command was erroneously handled by edit_macro(). https://github.com/ansible/ansible/issues/55212
|
|
@ -356,7 +356,9 @@ def check_args(module, warnings):
|
|||
|
||||
|
||||
def edit_config_or_macro(connection, commands):
|
||||
if "macro name" in commands[0]:
|
||||
# only catch the macro configuration command,
|
||||
# not negated 'no' variation.
|
||||
if commands[0].startswith("macro name"):
|
||||
connection.edit_macro(candidate=commands)
|
||||
else:
|
||||
connection.edit_config(candidate=commands)
|
||||
|
|
Loading…
Reference in a new issue