mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 04:12:48 +00:00
use show run instead of section pipeline ios_l2_interface (#39658)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
@@ -146,10 +146,9 @@ def is_switchport(name, module):
|
||||
|
||||
def interface_is_portchannel(name, module):
|
||||
if get_interface_type(name) == 'ethernet':
|
||||
config = get_config(module, flags=[' | section interface'])
|
||||
if 'channel group' in config:
|
||||
config = run_commands(module, ['show run interface {0}'.format(name)])[0]
|
||||
if any(c in config for c in ['channel group', 'channel-group']):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user