blob: 34ef7f639d736f1d6a996d862af1f303dd73518f [file] [log] [blame]
Filip Pytloun34f960c2015-10-06 16:28:32 +02001{%- from "mongodb/map.jinja" import server with context %}
Filip Pytloun34f960c2015-10-06 16:28:32 +02002# mongodb.conf
3
Ildar Svetlova92e01e2018-05-08 17:42:07 +04004# for documentation of all options, see:
5# http://docs.mongodb.org/manual/reference/configuration-options/
Filip Pytloun34f960c2015-10-06 16:28:32 +02006
Ildar Svetlova92e01e2018-05-08 17:42:07 +04007port={{ server.bind.port }}
8bind_ip={{ server.bind.address }}
Filip Pytloun34f960c2015-10-06 16:28:32 +02009
Ildar Svetlova92e01e2018-05-08 17:42:07 +040010logpath=/var/log/mongodb/mongod.log
Filip Pytloun34f960c2015-10-06 16:28:32 +020011logappend=true
12
Ildar Svetlova92e01e2018-05-08 17:42:07 +040013dbpath=/var/lib/mongodb
Filip Pytloun34f960c2015-10-06 16:28:32 +020014journal=true
15
Dmitry Kalashnik147fde72019-02-01 16:50:22 +040016# Disable journal preallocation for predictable service start time
17nopreallocj=true
18
Ildar Svetlova92e01e2018-05-08 17:42:07 +040019{%- if server.authorization.get('enabled', False) %}
20auth=true
21{%- endif %}
22{%- if server.shared_key is defined %}
23keyFile=/etc/mongodb.key
24{%- endif %}
Filip Pytloun34f960c2015-10-06 16:28:32 +020025
26{%- if server.replica_set is defined %}
Ildar Svetlova92e01e2018-05-08 17:42:07 +040027replSet={{ server.replica_set }}
Filip Pytloun34f960c2015-10-06 16:28:32 +020028{%- endif %}