From dd51ec94e74e92cfe3e50c7a2d6937b84c9a6478 Mon Sep 17 00:00:00 2001 From: Maarten Bezemer Date: Wed, 16 Nov 2016 22:27:09 +0100 Subject: [PATCH] mongodb_user: Allow pymongo version 3.2 in combination with mongodb 3.2 (#3474) --- 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 859309b8091..eace7271e11 100644 --- a/lib/ansible/modules/extras/database/misc/mongodb_user.py +++ b/lib/ansible/modules/extras/database/misc/mongodb_user.py @@ -179,7 +179,7 @@ def check_compatibility(module, client): loose_srv_version = LooseVersion(client.server_info()['version']) loose_driver_version = LooseVersion(PyMongoVersion) - if loose_srv_version >= LooseVersion('3.2') and loose_driver_version <= LooseVersion('3.2'): + if loose_srv_version >= LooseVersion('3.2') and loose_driver_version < LooseVersion('3.2'): module.fail_json(msg=' (Note: you must use pymongo 3.2+ with MongoDB >= 3.2)') elif loose_srv_version >= LooseVersion('3.0') and loose_driver_version <= LooseVersion('2.8'):