From 02b5057392d2e13a4eee4f0bb20e233fb54ec3fc Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 9 Aug 2018 02:27:03 +0200 Subject: [PATCH] Support dash-separated leaf IDs (as documented) (#43846) --- .../modules/network/aci/aci_static_binding_to_epg.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py b/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py index bdc41088dd..e97f627e15 100644 --- a/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py +++ b/lib/ansible/modules/network/aci/aci_static_binding_to_epg.py @@ -312,8 +312,11 @@ def main(): pod_id = module.params['pod_id'] leafs = module.params['leafs'] if leafs is not None: - # Users are likely to use integers for leaf IDs, which would raise an exception when using the join method - leafs = [str(leaf) for leaf in module.params['leafs']] + # Process leafs, and support dash-delimited leafs + leafs = [] + for leaf in module.params['leafs']: + # Users are likely to use integers for leaf IDs, which would raise an exception when using the join method + leafs.extend(str(leaf).split('-')) if len(leafs) == 1: if interface_type != 'vpc': leafs = leafs[0]