Allow user to choose PyMongo version when using pip

This commit is contained in:
Gaëtan Duchaussois 2018-06-27 11:57:28 +02:00
parent 82a303001f
commit bd4256da88
3 changed files with 7 additions and 2 deletions

View File

@ -38,6 +38,7 @@ mongodb_package: mongodb-org
mongodb_version: "3.6"
mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager
mongodb_pymongo_pip_version: # Choose PyMong version to install from pip. If not set use latest
mongodb_user_update_password: "on_create" # MongoDB user password update default policy
mongodb_manage_service: true

View File

@ -68,5 +68,8 @@
when: mongodb_pymongo_from_pip
- name: Install PyMongo from PIP
pip: name=pymongo state=latest
pip:
name: pymongo
state: "{{ mongodb_pymongo_pip_version is defined | ternary('present', 'latest') }}"
version: "{{ mongodb_pymongo_pip_version | default(omit) }}"
when: mongodb_pymongo_from_pip

View File

@ -42,5 +42,6 @@
- name: Install PyMongo from PIP
pip:
name: pymongo
state: latest
state: "{{ mongodb_pymongo_pip_version is defined | ternary('present', 'latest') }}"
version: "{{ mongodb_pymongo_pip_version | default(omit) }}"
when: mongodb_pymongo_from_pip