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:
Dag Wieers 2018-07-12 15:20:33 +02:00 committed by GitHub
commit 5465dca7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -358,6 +358,7 @@ def main():
route_profile = module.params['route_profile']
route_profile_l3_out = module.params['route_profile_l3_out']
scope = module.params['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: