/
mongod.conf.j2
42 lines (40 loc) · 1.58 KB
/
mongod.conf.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
######################################
### ###
### MANAGED BY ANSIBLE ###
### (DO NOT EDIT MANUALLY) ###
### ###
######################################
# https://docs.mongodb.com/manual/reference/configuration-options/#systemlog-options
storage:
dbPath: {{ mongodb_data_container_dir }}
engine: {{ mongodb_engine }}
journal:
enabled: true
{% if mongodb_engine == "wiredTiger" and ( mongodb_engine_config is defined and mongodb_engine_config != "" ) %}
wiredTiger:
engineConfig:
{% if mongodb_engine_config.cache_size_gb is defined and mongodb_engine_config.cache_size_gb != "" %}
cacheSizeGB: {{ mongodb_engine_config.cache_size_gb }}
{% endif %}
{% endif %}
net:
port: {{ mongodb_bind_port }}
bindIp: {{ mongodb_bind_ip }}
tls:
mode: {{ mongodb_tls_mode }}
certificateKeyFile: {{ mongodb_certs_container_dir }}/{{ mongodb_node_cert_key_name }}
CAFile: {{ mongodb_certs_container_dir }}/{{ mongodb_root_ca_cert_name }}
allowConnectionsWithoutCertificates: true
processManagement:
timeZoneInfo: /usr/share/zoneinfo
operationProfiling:
mode: slowOp
slowOpThresholdMs: 50
{% if ((mongodb_safe_mode is defined and mongodb_safe_mode == False) or (mongodb_safe_mode is not defined)) and (mongodb_security is defined and mongodb_security == "enabled") %}
security:
authorization: {{ mongodb_security }}
clusterAuthMode: keyFile
keyFile: {{ mongodb_secrets_container_dir }}/{{ mongodb_internode_keyfile }}
replication:
replSetName: {{ mongodb_replica_set_name }}
{% endif %}