---
- hosts: all
  user: vagrant
  sudo: true
  sudo_user: root
  vars:
    mongodb_version: 3.0.0
    cache_timeout: 259200

  tasks:
  - name: MongoDB | Fetch 10Gen signing key
    shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

  - name: MongoDB | Add 10Gen repository
    shell: echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

  - name: MongoDB | Install 
    apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes

  - name: MongoDB | Comment-out the bind_ip
    lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"

  - name: MongoDB | Ensure deamon is running correctly
    service: name=mongod enabled=yes state=started


---
- hosts: all
  user: vagrant
  sudo: true
  sudo_user: root
  vars:
    mongodb_version: 3.0.0
    cache_timeout: 259200

  tasks:
  - name: MongoDB | Fetch 10Gen signing key
    shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

  - name: MongoDB | Add 10Gen repository
    shell: echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

  - name: MongoDB | Install 
    apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes

  - name: MongoDB | Comment-out the bind_ip
    lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"

  - name: MongoDB | Ensure deamon is running correctly
    service: name=mongod enabled=yes state=started


Create a list file for MongoDB 3.0
Create a list file for MongoDB 3.0
