ansible-role-mongodb/tasks/install.deb.yml

19 lines
498 B
YAML

---
- include_vars: "{{ansible_distribution}}.yml"
- name: Add APT key
apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc id=7F0CEB10
when: '"mongodb-org" in mongodb_package'
- name: Add APT repository
apt_repository: repo="{{mongodb_repository}}" update_cache=yes
when: '"mongodb-org" in mongodb_package'
- name: Install MongoDB package
apt: pkg={{mongodb_package}} state=present
- name: Install additional packages
apt: pkg={{item}}
with_items: mongodb_additional_packages