From 8aa338ddfa8cd00f96b60391b0d8cd2ebc8c822b Mon Sep 17 00:00:00 2001 From: Lujeni Date: Fri, 23 Sep 2016 21:44:42 +0200 Subject: [PATCH] Fix mongodb_user default role value when update_password is set (#2997) --- database/misc/mongodb_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']