diff --git a/lib/ansible/modules/network/aci/aci_bd_subnet.py b/lib/ansible/modules/network/aci/aci_bd_subnet.py index 5117d6325c..3f63f09d82 100644 --- a/lib/ansible/modules/network/aci/aci_bd_subnet.py +++ b/lib/ansible/modules/network/aci/aci_bd_subnet.py @@ -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: