Skip to content

Commit bd4256d

Browse files
committed
Allow user to choose PyMongo version when using pip
1 parent 82a3030 commit bd4256d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ mongodb_package: mongodb-org
3838
mongodb_version: "3.6"
3939

4040
mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager
41+
mongodb_pymongo_pip_version: # Choose PyMong version to install from pip. If not set use latest
4142
mongodb_user_update_password: "on_create" # MongoDB user password update default policy
4243
mongodb_manage_service: true
4344

tasks/install.debian.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,8 @@
6868
when: mongodb_pymongo_from_pip
6969

7070
- name: Install PyMongo from PIP
71-
pip: name=pymongo state=latest
71+
pip:
72+
name: pymongo
73+
state: "{{ mongodb_pymongo_pip_version is defined | ternary('present', 'latest') }}"
74+
version: "{{ mongodb_pymongo_pip_version | default(omit) }}"
7275
when: mongodb_pymongo_from_pip

tasks/install.redhat.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
- name: Install PyMongo from PIP
4343
pip:
4444
name: pymongo
45-
state: latest
45+
state: "{{ mongodb_pymongo_pip_version is defined | ternary('present', 'latest') }}"
46+
version: "{{ mongodb_pymongo_pip_version | default(omit) }}"
4647
when: mongodb_pymongo_from_pip

0 commit comments

Comments
 (0)