aci_bd_subnet: Support parameter scope not set (#42675)
If parameter scope is not set (is None) the usual handling of lists does not apply, and should be avoided or we get an exception. This needs to be backported to earlier versions of Ansible.
This commit is contained in:
parent
7e42e88cc1
commit
5465dca7ec
1 changed files with 5 additions and 4 deletions
|
@ -358,10 +358,11 @@ def main():
|
|||
route_profile = module.params['route_profile']
|
||||
route_profile_l3_out = module.params['route_profile_l3_out']
|
||||
scope = module.params['scope']
|
||||
if 'private' in scope and 'public' in scope:
|
||||
module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
|
||||
else:
|
||||
scope = ','.join(sorted(scope))
|
||||
if scope is not None:
|
||||
if 'private' in scope and 'public' in scope:
|
||||
module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
|
||||
else:
|
||||
scope = ','.join(sorted(scope))
|
||||
state = module.params['state']
|
||||
subnet_control = module.params['subnet_control']
|
||||
if subnet_control:
|
||||
|
|
Loading…
Reference in a new issue