Skip to content

Commit

Permalink
Adjust calculation of min pymongo version
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Jan 16, 2020
1 parent cc44ec3 commit fbffeba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/StackStorm.mongodb/tasks/mongodb_auth.yml
Expand Up @@ -7,8 +7,8 @@
tags: [databases, mongodb]

- name: Install pymongo (for the mongodb_user module)
# pymongo 3.2+ is required to work with mongo 3.2+. system packages are too old.
# Use pip because system packages are too old for adequate mongodb support.
become: yes
pip:
name: "pymongo=={{ mongodb_major_minor_version }}"
zame: "pymongo>={{ pymongo_min_version }}"
tags: [databases, mongodb]
10 changes: 10 additions & 0 deletions roles/StackStorm.mongodb/vars/main.yml
Expand Up @@ -4,3 +4,13 @@ mongodb_major_minor_version: "{{ (mongodb_version|string)[:3] }}"
mongodb_apt_keys:
"3.2": "42F3E95A2C4F08279C4960ADD68FA50FEA312927"
"3.4": "0C49F3730359A14518585931BC711F9BA15703C6"

# https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#python-driver-compatibility
mongodb_to_pymongo_min_version:
"3.2": "3.2"
"3.4": "3.4"
"3.6": "3.6"
"4.0": "3.7"
"4.2": "3.9"

pymongo_min_version: "{{ mongodb_to_pymongo_min_version[mongodb_major_minor_version] }}"

0 comments on commit fbffeba

Please sign in to comment.