---
- name: Add the MongoDB repo key
  apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc state=present

- name: Add the MongoDB APT repository
  apt_repository: repo="deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" state=present

- name: Install the MongoDB package
  apt: name=mongodb-10gen state=present

- name: Ensure the MongoDB service is started and enabled
  service: name=mongodb state=started enabled=true


---
- name: Add the MongoDB repo key
  apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc state=present

- name: Add the MongoDB APT repository
  apt_repository: repo="deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.0 multiverse" state=present

- name: Install the MongoDB package
  apt: name=mongodb-org state=present

- name: Ensure the MongoDB service is started and enabled
  service: name=mongodb state=started enabled=true


Update MongoDB repo to new URL and package name.
Update MongoDB repo to new URL and package name.
