|
|
@ -98,14 +98,7 @@ def execute_show_command(module, command):
|
|
|
|
'command': command,
|
|
|
|
'command': command,
|
|
|
|
'output': format,
|
|
|
|
'output': format,
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
output = run_commands(module, cmds, False)
|
|
|
|
output = run_commands(module, cmds, check_rc='retry_json')
|
|
|
|
if len(output) == 0 or len(output[0]) == 0:
|
|
|
|
|
|
|
|
# If we get here the platform does not
|
|
|
|
|
|
|
|
# support structured output. Resend as
|
|
|
|
|
|
|
|
# text.
|
|
|
|
|
|
|
|
cmds[0]['output'] = 'text'
|
|
|
|
|
|
|
|
output = run_commands(module, cmds, False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return output
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -130,7 +123,7 @@ def map_config_to_obj(module):
|
|
|
|
output = execute_show_command(module, command)[0]
|
|
|
|
output = execute_show_command(module, command)[0]
|
|
|
|
|
|
|
|
|
|
|
|
if "Invalid command" in output:
|
|
|
|
if "Invalid command" in output:
|
|
|
|
module.fail_json(msg="banner: exec may not be supported on this platform. Possible values are : exec | motd")
|
|
|
|
module.fail_json(msg="banner: %s may not be supported on this platform. Possible values are : exec | motd" % module.params['banner'])
|
|
|
|
|
|
|
|
|
|
|
|
if isinstance(output, dict):
|
|
|
|
if isinstance(output, dict):
|
|
|
|
output = list(output.values())
|
|
|
|
output = list(output.values())
|
|
|
|