2018-09-11 17:12:04 +02:00
|
|
|
# mongod.conf
|
|
|
|
|
|
|
|
# for documentation of all options, see:
|
|
|
|
# http://docs.mongodb.org/manual/reference/configuration-options/
|
|
|
|
|
|
|
|
# Where and how to store data.
|
|
|
|
storage:
|
|
|
|
dbPath: {{ mongodb_dbpath }}
|
|
|
|
journal:
|
|
|
|
enabled: true
|
|
|
|
directoryPerDB: {{ mongodb_directoryperdb }}
|
|
|
|
engine: {{ mongodb_storage_engine }}
|
|
|
|
# mmapv1:
|
|
|
|
# wiredTiger:
|
|
|
|
|
|
|
|
# where to write logging data.
|
|
|
|
systemLog:
|
|
|
|
destination: {{ mongodb_systemlog_destination }}
|
2018-09-20 12:41:02 +02:00
|
|
|
{% if mongodb_logrotate_management %}
|
2018-09-11 17:12:04 +02:00
|
|
|
{% if not mongodb_systemlog_external_logrotate %}
|
|
|
|
logRotate: rename
|
|
|
|
logAppend: false
|
|
|
|
{% else %}
|
|
|
|
logRotate: reopen
|
|
|
|
logAppend: true
|
|
|
|
{% endif %}
|
2018-09-20 12:41:02 +02:00
|
|
|
{% else %}
|
|
|
|
logAppend: true
|
|
|
|
{% endif %}
|
|
|
|
path: {{ mongodb_logpath }}
|
2018-09-11 17:12:04 +02:00
|
|
|
# network information
|
|
|
|
net:
|
|
|
|
port: {{ mongodb_tcp_port }}
|
|
|
|
bindIp: {{ mongo_bind_ip }}
|
|
|
|
{% if mongodb_ssl_enabled %}
|
|
|
|
ssl:
|
|
|
|
mode: {{ mongodb_ssl_mode }}
|
|
|
|
PEMKeyFile: '{{ mongodb_ssl_certkey_file }}'
|
|
|
|
CAFile: '{{ mongodb_ssl_CA_file }}'
|
|
|
|
disabledProtocols: {{ mongodb_ssl_disabled_protocols }}
|
|
|
|
allowConnectionsWithoutCertificates: {{ mongodb_ssl_allowConnectionsWithoutCertificates }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
#processManagement:
|
2018-09-25 11:46:33 +02:00
|
|
|
{% if mongodb_authorization_enabled or mongodb_cluster_enabled %}
|
2018-09-11 17:12:04 +02:00
|
|
|
security:
|
2018-09-25 11:46:33 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if mongodb_authorization_enabled %}
|
2018-09-20 18:05:14 +02:00
|
|
|
authorization: enabled
|
|
|
|
{% endif %}
|
|
|
|
{%if mongodb_cluster_enabled %}
|
2018-09-20 12:41:02 +02:00
|
|
|
keyFile: {{ mongodb_replica_keyfile }}
|
|
|
|
|
2018-09-11 17:12:04 +02:00
|
|
|
replication:
|
2018-09-20 12:41:02 +02:00
|
|
|
oplogSizeMB: {{ mongodb_oplog_size }}
|
2018-09-11 17:12:04 +02:00
|
|
|
replSetName: {{ mongodb_replicaset }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
#sharding:
|
|
|
|
|