mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Update eos_l2_interface.py (#42270)
This commit is contained in:
committed by
Trishna Guha
parent
b60fc33eef
commit
51092c6ea5
@@ -207,8 +207,9 @@ def map_config_to_obj(module):
|
||||
instances = list()
|
||||
|
||||
for item in set(match):
|
||||
command = 'sh int {0} switchport | include Switchport'
|
||||
switchport_cfg = run_commands(module, command.format(item))[0].split(':')[1].strip()
|
||||
command = {'command': 'show interfaces {0} switchport | include Switchport'.format(item),
|
||||
'output': 'text'}
|
||||
switchport_cfg = run_commands(module, command)[0].split(':')[1].strip()
|
||||
if switchport_cfg == 'Enabled':
|
||||
state = 'present'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user