1
0
Fork 0
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:
Trishna Guha 2018-05-04 21:22:09 +05:30 committed by GitHub
parent d44fd70d02
commit dddcbb7198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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