Better handle mongodb-org

This commit is contained in:
Kirill Klenov 2015-01-23 12:43:11 +03:00
parent 255442f3ae
commit 862a633425
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ mongodb_additional_packages:
- python-pymongo
mongodb_user: mongodb
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' == mongodb_package) else 'mongodb' }}"
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"
mongodb_conf_auth: no # Run with security
mongodb_conf_bind_ip: 127.0.0.1 # Comma separated list of ip addresses to listen on

View File

@ -4,11 +4,11 @@
- name: Add APT key
apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc id=7F0CEB10
when: mongodb_package == 'mongodb-org'
when: '"mongodb-org" in mongodb_package'
- name: Add APT repository
apt_repository: repo="{{mongodb_repository}}" update_cache=yes
when: mongodb_package == 'mongodb-org'
when: '"mongodb-org" in mongodb_package'
- name: Install MongoDB package
apt: pkg={{mongodb_package}} state=present