Skip to content
Snippets Groups Projects
Verified Commit 0d455686 authored by nd's avatar nd
Browse files

fix mongodb config

parent 53714e2c
No related branches found
No related tags found
No related merge requests found
- name: install mongodb
apt:
pkg:
- mongodb-org
- name: enable replication sets
- name: copy mongodb config
notify:
- restart mongodb
- start mongodb replication
lineinfile:
path: /etc/mongod.conf
regexp: "^#replication:"
line: "replication:\n replSetName: rs01"
template:
dest: /etc/mongod.conf
src: mongod.conf.j2
- name: start and enable mongodb
systemd:
......
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#security:
#operationProfiling:
replication:
replSetName: rs01
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
packages:
pkgs:
"mongodb-org": {}
repos:
mongodb:
url: "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release|lower }}/mongodb-org/{{ mongodb.version }} main"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment