Skip to content

Instantly share code, notes, and snippets.

@johndstein
Created June 7, 2014 03:51
Show Gist options
  • Save johndstein/8797370954ff5578713f to your computer and use it in GitHub Desktop.
Save johndstein/8797370954ff5578713f to your computer and use it in GitHub Desktop.
Ansible install mongodb
# Install mongodb
---
- name: Add mongo ppa key
sudo: yes
apt_key: >
keyserver=hkp://keyserver.ubuntu.com:80
id=7F0CEB10
state=present
- name: Add mongo sources list
sudo: yes
lineinfile: >
line="deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
dest=/etc/apt/sources.list.d/mongodb.list
state=present
create=yes
- name: Install mongo
sudo: yes
apt: name=mongodb-10gen state=latest update_cache=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment