mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
d44fd70d02
commit
dddcbb7198
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue