mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Lenovo enos bugfixes (#33857)
* Bug Fixes to issues foubd during testing * Removing blank line * undefined-variable Undefined variable 'run_commands' and training new line * Reverting and Modifying changes with both Unit test and Integrated test with Devices passing
This commit is contained in:
parent
15a58d498d
commit
890b97a38f
2 changed files with 12 additions and 12 deletions
|
@ -97,7 +97,11 @@ def get_connection(module):
|
|||
def get_config(module, flags=None):
|
||||
flags = [] if flags is None else flags
|
||||
|
||||
passwords = module.params['passwords']
|
||||
passwords = None
|
||||
try:
|
||||
passwords = module.params['passwords']
|
||||
except KeyError:
|
||||
passwords = None
|
||||
if passwords:
|
||||
cmd = 'more system:running-config'
|
||||
else:
|
||||
|
@ -147,6 +151,7 @@ def run_commands(module, commands, check_rc=True):
|
|||
def load_config(module, config):
|
||||
try:
|
||||
conn = get_connection(module)
|
||||
conn.get('enable')
|
||||
conn.edit_config(config)
|
||||
except ConnectionError as exc:
|
||||
module.fail_json(msg=to_text(exc))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue