From 43632951fe426505b8194e9efd000647c1e57b92 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Fri, 30 Sep 2016 16:24:12 -0400 Subject: [PATCH] Fixing nxos_aaa_server (#5002) * Fixing command output formatting * Fixing cmds --- lib/ansible/modules/network/nxos/nxos_aaa_server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_aaa_server.py b/lib/ansible/modules/network/nxos/nxos_aaa_server.py index 43cc3425f26..33988657e6f 100644 --- a/lib/ansible/modules/network/nxos/nxos_aaa_server.py +++ b/lib/ansible/modules/network/nxos/nxos_aaa_server.py @@ -349,7 +349,7 @@ def execute_show(cmds, module, command_type=None): module.cli.add_commands(cmds, output=command_type) response = module.cli.run_commands() else: - module.cli.add_commands(cmds) + module.cli.add_commands(cmds, raw=True) response = module.cli.run_commands() except ShellError: clie = get_exception() @@ -543,7 +543,7 @@ def main(): command = default_aaa_server(existing, proposed, server_type) if command: commands.append(command) - + cmds = flatten_list(commands) if cmds: if module.check_mode: @@ -552,6 +552,8 @@ def main(): changed = True execute_config_command(cmds, module) end_state = get_aaa_server_info(server_type, module) + if 'configure' in cmds: + cmds.pop(0) results = {} results['proposed'] = proposed