From 66fe6bfa0bd974d921a94373c1b7b94da9e71de8 Mon Sep 17 00:00:00 2001 From: Chris Van Heuveln Date: Wed, 13 Mar 2019 00:14:00 -0400 Subject: [PATCH] nxos_linkagg: `group` type mismatch causes idempotency failure (#53653) * nxos_linkagg: `group` type mismatch causes idempotency failure * `group` values need to be cast; e.g. ``` want = {'group': '20'} have = {'group': 20} ``` * Found with N7K `sanity` test * nxos_linkagg: change group param type to str --- lib/ansible/modules/network/nxos/nxos_linkagg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_linkagg.py b/lib/ansible/modules/network/nxos/nxos_linkagg.py index 2744f50e23..cea120d96d 100644 --- a/lib/ansible/modules/network/nxos/nxos_linkagg.py +++ b/lib/ansible/modules/network/nxos/nxos_linkagg.py @@ -334,7 +334,7 @@ def parse_channel_options(module, output, channel): obj = {} group = channel['group'] - obj['group'] = group + obj['group'] = str(group) obj['min_links'] = parse_min_links(module, group) members = parse_members(output, group) obj['members'] = members @@ -372,7 +372,7 @@ def main(): """ main entry point for module execution """ element_spec = dict( - group=dict(type='int'), + group=dict(type='str'), mode=dict(required=False, choices=['on', 'active', 'passive'], default='on', type='str'), min_links=dict(required=False, default=None, type='int'), members=dict(required=False, default=None, type='list'),