Created
June 12, 2015 11:37
-
-
Save kharandziuk/c11beb0a826a1ec225f1 to your computer and use it in GitHub Desktop.
Playbook. Installs MongoDB 3.* with ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Machine with mongodb 3 | |
hosts: all | |
sudo: True | |
tasks: | |
- name: set locale | |
lineinfile: dest=/etc/default/locale line="LC_ALL=C" | |
- name: Add mongo ppa key | |
apt_key: > | |
keyserver=hkp://keyserver.ubuntu.com:80 | |
id=7F0CEB10 | |
state=present | |
- name: Add mongo sources list | |
lineinfile: > | |
line="deb http://repo.mongodb.org/apt/ubuntu {{ansible_lsb.codename}}/mongodb-org/3.0 multiverse" | |
dest=/etc/apt/sources.list.d/mongodb.list | |
state=present | |
create=yes | |
- name: Install mongo | |
apt: name=mongodb-org state=latest update_cache=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment