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

fix mongodb config

parent 53714e2c
Branches
No related tags found
No related merge requests found
- name: install mongodb - name: copy mongodb config
apt:
pkg:
- mongodb-org
- name: enable replication sets
notify: notify:
- restart mongodb - restart mongodb
- start mongodb replication - start mongodb replication
lineinfile: template:
path: /etc/mongod.conf dest: /etc/mongod.conf
regexp: "^#replication:" src: mongod.conf.j2
line: "replication:\n replSetName: rs01"
- name: start and enable mongodb - name: start and enable mongodb
systemd: 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: packages:
pkgs:
"mongodb-org": {}
repos: repos:
mongodb: mongodb:
url: "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release|lower }}/mongodb-org/{{ mongodb.version }} main" 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