Debian Codegraph @

ansible_collections/community/mongodb/roles/mongodb_config/templates/configsrv.conf.j2

raw
1 # mongod.conf
2
3 # for documentation of all options, see:
4 # http://docs.mongodb.org/manual/reference/configuration-options/
5
6 # where to write logging data.
7 systemLog:
8 destination: file
9 logAppend: true
10 path: {{ log_path }}
11
12 # Where and how to store data.
13 storage:
14 dbPath: {{ db_path }}
15 {% if mongodb_version | float < 6.1 %}
16 journal:
17 enabled: true
18 {% endif %}
19 engine: "wiredTiger"
20
21 # how the process runs
22 processManagement:
23 {% if ansible_facts.os_family == "RedHat" and ansible_facts.distribution != "Amazon" and ansible_facts.distribution != "AlmaLinux" and ansible_facts.distribution != "Fedora" %} # Breaks Ubuntu / Debian
24 fork: true
25 pidFilePath: /var/run/mongodb/mongod.pid
26 {% endif %}
27 timeZoneInfo: /usr/share/zoneinfo
28
29 # network interfaces
30 net:
31 port: {{ config_port }}
32 {% if bind_ip_all %}
33 bindIpAll: true
34 {% else %}
35 bindIp: {{ bind_ip }}
36 {% endif %}
37 {% if net_compressors %}
38 compression:
39 compressors: {{ net_compressors }}
40 {% endif %}
41 {% if mongodb_use_tls %}
42 tls:
43 mode: requireTLS
44 certificateKeyFile: {{ mongodb_certificate_key_file }}
45 CAFile: {{ mongodb_certificate_ca_file }}
46 {% if mongodb_disabled_tls_protocols != "" %}
47 disabledProtocols: {{ mongodb_disabled_tls_protocols }}
48 {% endif %}
49 {% if mongodb_allow_connections_without_certificates %}
50 allowConnectionsWithoutCertificates: true
51 {% endif %}
52 {% endif %}
53
54 {% if authorization == "enabled" %}
55 security:
56 authorization: {{ authorization }}
57 keyFile: {{ openssl_keyfile_path }}
58 {% endif %}
59
60 #operationProfiling:
61
62 {% if replicaset %}
63 replication:
64 replSetName: {{ config_repl_set_name }}
65 {% endif %}
66
67 sharding:
68 clusterRole: configsvr