mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
8749894ebc
commit
37f68bffc0
1 changed files with 4 additions and 5 deletions
|
@ -167,7 +167,7 @@ def execute_show_command(command, module, command_type='cli_show'):
|
||||||
cmds = [command]
|
cmds = [command]
|
||||||
body = run_commands(module, cmds)
|
body = run_commands(module, cmds)
|
||||||
elif module.params['transport'] == 'nxapi':
|
elif module.params['transport'] == 'nxapi':
|
||||||
cmds = [command]
|
cmds = {'command': command, 'output': 'text'}
|
||||||
body = run_commands(module, cmds)
|
body = run_commands(module, cmds)
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
@ -208,7 +208,7 @@ def get_aaa_host_info(module, server_type, address):
|
||||||
|
|
||||||
body = execute_show_command(command, module, command_type='cli_show_ascii')
|
body = execute_show_command(command, module, command_type='cli_show_ascii')
|
||||||
|
|
||||||
if body:
|
if body[0]:
|
||||||
try:
|
try:
|
||||||
pattern = ('(acct-port \d+)|(timeout \d+)|(auth-port \d+)|'
|
pattern = ('(acct-port \d+)|(timeout \d+)|(auth-port \d+)|'
|
||||||
'(key 7 "\w+")|( port \d+)')
|
'(key 7 "\w+")|( port \d+)')
|
||||||
|
@ -217,7 +217,6 @@ def get_aaa_host_info(module, server_type, address):
|
||||||
'auth-port': 'auth_port',
|
'auth-port': 'auth_port',
|
||||||
'port': 'tacacs_port',
|
'port': 'tacacs_port',
|
||||||
'timeout': 'host_timeout'})
|
'timeout': 'host_timeout'})
|
||||||
if aaa_host_info:
|
|
||||||
aaa_host_info['server_type'] = server_type
|
aaa_host_info['server_type'] = server_type
|
||||||
aaa_host_info['address'] = address
|
aaa_host_info['address'] = address
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
|
Loading…
Reference in a new issue