diff --git a/lib/ansible/modules/network/nxos/nxos_portchannel.py b/lib/ansible/modules/network/nxos/nxos_portchannel.py index 9bf8b86300b..b781a066a12 100644 --- a/lib/ansible/modules/network/nxos/nxos_portchannel.py +++ b/lib/ansible/modules/network/nxos/nxos_portchannel.py @@ -203,6 +203,8 @@ def get_portchannel(module, netcfg=None): for pc in pc_table: if pc['group'] == module.params['group']: portchannel_table = pc + elif module.params['group'].isdigit() and pc['group'] == int(module.params['group']): + portchannel_table = pc except (KeyError, AttributeError, TypeError, IndexError): return {}