From 51092c6ea52c2b051434d2f997dfa2167114410b Mon Sep 17 00:00:00 2001 From: Dave Thelen Date: Wed, 4 Jul 2018 00:47:46 -0400 Subject: [PATCH] Update eos_l2_interface.py (#42270) --- lib/ansible/modules/network/eos/eos_l2_interface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/eos/eos_l2_interface.py b/lib/ansible/modules/network/eos/eos_l2_interface.py index 4ebb64f4d7..a8fe9cecc4 100644 --- a/lib/ansible/modules/network/eos/eos_l2_interface.py +++ b/lib/ansible/modules/network/eos/eos_l2_interface.py @@ -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: