diff --git a/database/misc/mongodb_user.py b/database/misc/mongodb_user.py index 551b565088e..669c68516fd 100644 --- a/database/misc/mongodb_user.py +++ b/database/misc/mongodb_user.py @@ -322,7 +322,7 @@ def main(): ssl_cert_reqs = None if ssl: ssl_cert_reqs = getattr(ssl_lib, module.params['ssl_cert_reqs']) - roles = module.params['roles'] + roles = module.params['roles'] or [] state = module.params['state'] update_password = module.params['update_password']