13
13
ssl:
14
14
mode: {{ mongodb_net_ssl_mode }}
15
15
PEMKeyFile: {{ mongodb_net_ssl_pemfile }}
16
- {% endif %}
17
- {% if mongodb_config ['net' ] is defined and mongodb_config ['net' ] is iterable - %}
18
- {% for item in mongodb_config ['net' ] -%}
16
+ {% - endif %}
17
+ {% - if mongodb_config ['net' ] is defined and mongodb_config ['net' ] is iterable %}
18
+ {% - for item in mongodb_config ['net' ] -%}
19
19
{{ item }}
20
- {% endfor - %}
21
- {% endif - %}
20
+ {% endfor %}
21
+ {% endif %}
22
22
23
23
processManagement:
24
24
fork: {{ mongodb_processmanagement_fork | to_nice_json}}
25
25
{% if mongodb_pidfile_path is defined and mongodb_pidfile_path != '' -%}
26
26
pidFilePath: {{ mongodb_pidfile_path }}
27
- {% endif %}
28
- {% if mongodb_config ['processManagement' ] is defined and mongodb_config ['processManagement' ] is iterable - %}
29
- {% for item in mongodb_config ['processManagement' ] -%}
27
+ {% - endif %}
28
+ {% - if mongodb_config ['processManagement' ] is defined and mongodb_config ['processManagement' ] is iterable %}
29
+ {% - for item in mongodb_config ['processManagement' ] -%}
30
30
{{ item }}
31
- {% endfor - %}
32
- {% endif - %}
31
+ {% endfor %}
32
+ {% endif %}
33
33
34
34
{% if mongodb_replication_replset -%}
35
35
replication:
36
36
oplogSizeMB: {{ mongodb_replication_oplogsize | int }}
37
37
replSetName: {{ mongodb_replication_replset }}
38
38
{% if mongodb_storage_engine == 'mmapv1' -%}
39
39
secondaryIndexPrefetch: {{ mongodb_replication_replindexprefetch }}
40
- {% endif %}
41
- {% if mongodb_config ['replication' ] is defined and mongodb_config ['replication' ] is iterable - %}
42
- {% for item in mongodb_config ['replication' ] -%}
40
+ {% - endif %}
41
+ {% - if mongodb_config ['replication' ] is defined and mongodb_config ['replication' ] is iterable %}
42
+ {% - for item in mongodb_config ['replication' ] -%}
43
43
{{ item }}
44
- {% endfor - %}
45
- {% endif - %}
44
+ {% endfor %}
45
+ {% endif %}
46
46
{% endif %}
47
47
48
48
security:
@@ -51,11 +51,11 @@ security:
51
51
keyFile: {{ mongodb_security_keyfile }}
52
52
{% endif -%}
53
53
javascriptEnabled: {{ mongodb_security_javascript_enabled | to_nice_json }}
54
- {% if mongodb_config ['security' ] is defined and mongodb_config ['security' ] is iterable - %}
55
- {% for item in mongodb_config ['security' ] -%}
54
+ {% - if mongodb_config ['security' ] is defined and mongodb_config ['security' ] is iterable %}
55
+ {% - for item in mongodb_config ['security' ] -%}
56
56
{{ item }}
57
- {% endfor - %}
58
- {% endif - %}
57
+ {% endfor %}
58
+ {% endif %}
59
59
60
60
storage:
61
61
dbPath: {{ mongodb_storage_dbpath }}
@@ -77,50 +77,50 @@ storage:
77
77
cacheSizeGB: {{ mongodb_wiredtiger_cache_size }}
78
78
{% endif -%}
79
79
directoryForIndexes: {{ mongodb_wiredtiger_directory_for_indexes | to_nice_json }}
80
- {% endif %}
81
- {% if mongodb_config ['storage' ] is defined and mongodb_config ['storage' ] is iterable - %}
82
- {% for item in mongodb_config ['storage' ] -%}
80
+ {% - endif %}
81
+ {% - if mongodb_config ['storage' ] is defined and mongodb_config ['storage' ] is iterable %}
82
+ {% - for item in mongodb_config ['storage' ] -%}
83
83
{{ item }}
84
- {% endfor - %}
85
- {% endif - %}
84
+ {% endfor %}
85
+ {% endif %}
86
86
87
87
systemLog:
88
88
destination: {{ mongodb_systemlog_destination }}
89
89
{% if mongodb_systemlog_destination == 'file' -%}
90
90
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
91
91
logRotate: {{ mongodb_systemlog_logrotate }}
92
92
path: {{ mongodb_systemlog_path }}
93
- {% endif %}
94
- {% if mongodb_config ['systemLog' ] is defined and mongodb_config ['systemLog' ] is iterable - %}
95
- {% for item in mongodb_config ['systemLog' ] -%}
93
+ {% - endif %}
94
+ {% - if mongodb_config ['systemLog' ] is defined and mongodb_config ['systemLog' ] is iterable %}
95
+ {% - for item in mongodb_config ['systemLog' ] -%}
96
96
{{ item }}
97
- {% endfor - %}
98
- {% endif - %}
97
+ {% endfor %}
98
+ {% endif %}
99
99
100
100
operationProfiling:
101
101
slowOpThresholdMs: {{ mongodb_operation_profiling_slow_op_threshold_ms }}
102
102
mode: {{ mongodb_operation_profiling_mode }}
103
- {% if mongodb_config ['operationProfiling' ] is defined and mongodb_config ['operationProfiling' ] is iterable - %}
104
- {% for item in mongodb_config ['operationProfiling' ] -%}
103
+ {% - if mongodb_config ['operationProfiling' ] is defined and mongodb_config ['operationProfiling' ] is iterable %}
104
+ {% - for item in mongodb_config ['operationProfiling' ] -%}
105
105
{{ item }}
106
- {% endfor - %}
107
- {% endif - %}
106
+ {% endfor %}
107
+ {% endif %}
108
108
109
109
{% if mongodb_major_version is version ("4.0" , ">=" ) -%}
110
110
cloud:
111
111
monitoring:
112
112
free:
113
113
state: {{ mongodb_cloud_monitoring_free_state }}
114
- {% if mongodb_config ['cloud' ] is defined and mongodb_config ['cloud' ] is iterable - %}
115
- {% for item in mongodb_config ['cloud' ] -%}
114
+ {% - if mongodb_config ['cloud' ] is defined and mongodb_config ['cloud' ] is iterable %}
115
+ {% - for item in mongodb_config ['cloud' ] -%}
116
116
{{ item }}
117
- {% endfor - %}
118
- {% endif - %}
119
- {% endif - %}
117
+ {% endfor %}
118
+ {% endif %}
119
+ {% endif %}
120
120
121
121
{% if mongodb_set_parameters -%}
122
122
setParameter:
123
123
{% for key , value in mongodb_set_parameters .items () -%}
124
124
{{ key }}: {{ value }}
125
- {% endfor - %}
125
+ {% endfor %}
126
126
{% endif %}
0 commit comments