Merge pull request #14 from duhast/master
Ability to install PyMongo from PIP
This commit is contained in:
commit
b677edb9b3
|
@ -13,8 +13,7 @@ Ansible role which manage [MongoDB](http://www.mongodb.org/)
|
|||
mongodb_package: mongodb-org
|
||||
|
||||
mongodb_force_wait_for_port: false # When not forced, the role will wait for mongod port to become available only with systemd
|
||||
mongodb_additional_packages:
|
||||
- python-pymongo
|
||||
mongodb_pymongo_from_pip: false # Install latest PyMongo via PIP or package manager
|
||||
|
||||
mongodb_manager_service: true
|
||||
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
mongodb_package: mongodb-org
|
||||
mongodb_force_wait_for_port: false
|
||||
|
||||
mongodb_additional_packages:
|
||||
- python-pymongo
|
||||
mongodb_pymongo_from_pip: false # Install latest PyMongo via PIP or package manager
|
||||
|
||||
mongodb_manager_service: true
|
||||
|
||||
|
|
|
@ -34,6 +34,18 @@
|
|||
changed_when: false
|
||||
when: "'systemd' in systemd.stdout"
|
||||
|
||||
- name: Install additional packages
|
||||
apt: pkg={{item}}
|
||||
with_items: mongodb_additional_packages
|
||||
- name: Install PyMongo package
|
||||
apt: pkg=python-pymongo state=latest
|
||||
when: not mongodb_pymongo_from_pip
|
||||
|
||||
- name: Install PIP
|
||||
apt: pkg={{ item }}
|
||||
with_items:
|
||||
- python-dev
|
||||
- python-pip
|
||||
when: mongodb_pymongo_from_pip
|
||||
|
||||
- name: Install PyMongo from PIP
|
||||
pip: name=pymongo state=latest
|
||||
when: mongodb_pymongo_from_pip
|
||||
|
||||
|
|
Loading…
Reference in New Issue