Skip to content

Instantly share code, notes, and snippets.

@apanimesh061
Last active March 17, 2016 18:35
Show Gist options
  • Save apanimesh061/89296f321ef835caf2c1 to your computer and use it in GitHub Desktop.
Save apanimesh061/89296f321ef835caf2c1 to your computer and use it in GitHub Desktop.
- hosts: all
sudo: true
roles:
- Stouts.mongodb
vars:
- mongodb_conf_replSet: rs0
- mongodb_conf_bind_ip: 192.168.111.11
- mongodb_shell:
rs.initiate()
I use the following playbook:
---
- hosts: all
sudo: true
vars:
mongodb_conf_replSet: rs0/192.168.111.11:27017
mongodb_conf_bind_ip: 192.168.111.11
mongodb_shell:
test:
- rs.initiate()
roles:
- Stouts.mongodb
After installation I checked:
MongoDB shell version: 3.2.1
connecting to: 192.168.111.11:27017/test
> db.getName()
test
> show databases
admin (empty)
local 0.078GB
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment