Skip to content

Commit

Permalink
use show run instead of section pipeline ios_l2_interface (ansible#39658
Browse files Browse the repository at this point in the history
)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
  • Loading branch information
trishnaguha authored and Alexander Bethke committed May 14, 2018
1 parent 1042642 commit 9f9246e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/ansible/modules/network/ios/ios_l2_interface.py
Expand Up @@ -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


Expand Down

0 comments on commit 9f9246e

Please sign in to comment.