mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
roll up of eos fixes (#21987)
* fixes to_command function in eos to not iterate over commands twice * fixes lots of minor issues with _eos_template
This commit is contained in:
parent
888c8614fb
commit
c1c54f1bf4
2 changed files with 22 additions and 20 deletions
|
@ -432,15 +432,7 @@ def to_command(module, commands):
|
|||
answer=dict()
|
||||
), module)
|
||||
|
||||
commands = transform(to_list(commands))
|
||||
|
||||
for index, item in enumerate(commands):
|
||||
if is_json(item['command']):
|
||||
item['output'] = 'json'
|
||||
elif is_text(item['command']):
|
||||
item['output'] = 'text'
|
||||
|
||||
return commands
|
||||
return transform(to_list(commands))
|
||||
|
||||
def get_config(module, flags=[]):
|
||||
conn = get_connection(module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue