mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fixes for broken asa_config module (#27218)
* Fixes for broken asa_config module * strip() prompt before checking
This commit is contained in:
committed by
Peter Sprygada
parent
40eb349ac6
commit
089226e372
@@ -103,9 +103,10 @@ def to_commands(module, commands):
|
||||
|
||||
|
||||
def run_commands(module, commands, check_rc=True):
|
||||
commands = to_commands(module, to_list(commands))
|
||||
connection = get_connection(module)
|
||||
|
||||
commands = to_commands(module, to_list(commands))
|
||||
|
||||
responses = list()
|
||||
|
||||
for cmd in commands:
|
||||
@@ -116,9 +117,13 @@ def run_commands(module, commands, check_rc=True):
|
||||
|
||||
|
||||
def get_config(module, flags=[]):
|
||||
cmd = 'show running-config '
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
passwords = module.params['passwords']
|
||||
if passwords:
|
||||
cmd = 'more system:running-config'
|
||||
else:
|
||||
cmd = 'show running-config '
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
|
||||
try:
|
||||
return _DEVICE_CONFIGS[cmd]
|
||||
|
||||
Reference in New Issue
Block a user