1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update eos_l2_interface.py (#42270)

This commit is contained in:
Dave Thelen 2018-07-04 00:47:46 -04:00 committed by Trishna Guha
parent b60fc33eef
commit 51092c6ea5

View file

@ -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: