Skip to content

Instantly share code, notes, and snippets.

@shohey1226
Created January 19, 2014 08:38
Show Gist options
  • Save shohey1226/8502045 to your computer and use it in GitHub Desktop.
Save shohey1226/8502045 to your computer and use it in GitHub Desktop.
---
- hosts: servers
user: root
tasks:
- name: create repository for packages
copy: src=files/mongodb.repo dest=/etc/yum.repos.d/mongodb.repo
- name: install mongodb pacakges
yum: name=mongo-10gen state=latest
yum: name=mongo-10gen-server state=latest
- name: config mongodb
command: /sbin/chkconfig mongod on
- name: start mongodb
command: /etc/init.d/mongod start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment