mongodb_user: fix ssl_cert_reqs exception (#2573)
If ssl is not enabled, but ssl_cert_reqs is passed to pymongo, an exception occures. Fixes: #2571
This commit is contained in:
parent
51eb68b4d7
commit
5c35d55b3c
1 changed files with 3 additions and 1 deletions
|
@ -299,7 +299,9 @@ def main():
|
|||
user = module.params['name']
|
||||
password = module.params['password']
|
||||
ssl = module.params['ssl']
|
||||
ssl_cert_reqs = getattr(ssl_lib, module.params['ssl_cert_reqs'])
|
||||
ssl_cert_reqs = None
|
||||
if ssl:
|
||||
ssl_cert_reqs = getattr(ssl_lib, module.params['ssl_cert_reqs'])
|
||||
roles = module.params['roles']
|
||||
state = module.params['state']
|
||||
update_password = module.params['update_password']
|
||||
|
|
Loading…
Reference in a new issue