From 477d174fbc1a20d4f5ae3867007da88553c9bbcf 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) --- lib/ansible/modules/extras/database/misc/mongodb_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/database/misc/mongodb_user.py b/lib/ansible/modules/extras/database/misc/mongodb_user.py index 266b902fda..e0d1342bc4 100644 --- a/lib/ansible/modules/extras/database/misc/mongodb_user.py +++ b/lib/ansible/modules/extras/database/misc/mongodb_user.py @@ -315,7 +315,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']