Merge pull request #14 from duhast/master

Ability to install PyMongo from PIP
This commit is contained in:
Sergei Antipov 2015-04-06 22:16:14 +05:00
commit b677edb9b3
3 changed files with 17 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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