diff options
author | Gabriele <gabrielegerbino@gmail.com> | 2016-11-08 02:44:27 +0100 |
---|---|---|
committer | Peter Sprygada <privateip@users.noreply.github.com> | 2016-11-07 20:44:27 -0500 |
commit | aff0c1203869061e0b783508b4e47fca8314a7d1 (patch) | |
tree | 923ae7c9f12e41424e438a2e7e6315a552546ef1 | |
parent | 20cb0da7dcaa69bccf1ed80290f02b161ef132d7 (diff) | |
download | ansible-modules-core-aff0c1203869061e0b783508b4e47fca8314a7d1.tar.gz |
Fixing module (#5451)
-rw-r--r-- | network/nxos/nxos_vtp_password.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/network/nxos/nxos_vtp_password.py b/network/nxos/nxos_vtp_password.py index c49fd7ab..30f0abfa 100644 --- a/network/nxos/nxos_vtp_password.py +++ b/network/nxos/nxos_vtp_password.py @@ -280,7 +280,7 @@ def get_cli_body_ssh(command, response, module): """ if 'xml' in response[0] or response[0] == '\n': body = [] - elif 'show run' in command: + elif 'show run' in command or 'status' in command: body = response else: try: @@ -324,7 +324,7 @@ def execute_show(cmds, module, command_type=None): def execute_show_command(command, module, command_type='cli_show'): if module.params['transport'] == 'cli': - if 'show run' not in command: + if 'show run' not in command and 'status' not in command: command += ' | json' cmds = [command] response = execute_show(cmds, module) @@ -369,7 +369,6 @@ def get_vtp_config(module): if body: version_regex = '.*VTP version running\s+:\s+(?P<version>\d).*' domain_regex = '.*VTP Domain Name\s+:\s+(?P<domain>\S+).*' - try: match_version = re.match(version_regex, body, re.DOTALL) version = match_version.groupdict()['version'] |