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' ] -%}
19
+ {{ item }}
20
+ {% endfor %}
16
21
{% endif %}
17
22
18
23
processManagement:
19
24
fork: {{ mongodb_processmanagement_fork | to_nice_json}}
20
25
{% if mongodb_pidfile_path is defined and mongodb_pidfile_path != '' -%}
21
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' ] -%}
30
+ {{ item }}
31
+ {% endfor %}
22
32
{% endif %}
23
33
24
34
{% if mongodb_replication_replset -%}
@@ -27,6 +37,11 @@ replication:
27
37
replSetName: {{ mongodb_replication_replset }}
28
38
{% if mongodb_storage_engine == 'mmapv1' -%}
29
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' ] -%}
43
+ {{ item }}
44
+ {% endfor %}
30
45
{% endif %}
31
46
{% endif %}
32
47
@@ -36,6 +51,11 @@ security:
36
51
keyFile: {{ mongodb_security_keyfile }}
37
52
{% endif -%}
38
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' ] -%}
56
+ {{ item }}
57
+ {% endfor %}
58
+ {% endif %}
39
59
40
60
storage:
41
61
dbPath: {{ mongodb_storage_dbpath }}
@@ -57,6 +77,11 @@ storage:
57
77
cacheSizeGB: {{ mongodb_wiredtiger_cache_size }}
58
78
{% endif -%}
59
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' ] -%}
83
+ {{ item }}
84
+ {% endfor %}
60
85
{% endif %}
61
86
62
87
systemLog:
@@ -65,22 +90,37 @@ systemLog:
65
90
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
66
91
logRotate: {{ mongodb_systemlog_logrotate }}
67
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' ] -%}
96
+ {{ item }}
97
+ {% endfor %}
68
98
{% endif %}
69
99
70
100
operationProfiling:
71
101
slowOpThresholdMs: {{ mongodb_operation_profiling_slow_op_threshold_ms }}
72
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' ] -%}
105
+ {{ item }}
106
+ {% endfor %}
107
+ {% endif %}
73
108
74
109
{% if mongodb_major_version is version ("4.0" , ">=" ) -%}
75
110
cloud:
76
111
monitoring:
77
112
free:
78
113
state: {{ mongodb_cloud_monitoring_free_state }}
79
- {% endif -%}
114
+ {% - if mongodb_config ['cloud' ] is defined and mongodb_config ['cloud' ] is iterable %}
115
+ {% - for item in mongodb_config ['cloud' ] -%}
116
+ {{ item }}
117
+ {% endfor %}
118
+ {% endif %}
119
+ {% endif %}
80
120
81
121
{% if mongodb_set_parameters -%}
82
122
setParameter:
83
123
{% for key , value in mongodb_set_parameters .items () -%}
84
124
{{ key }}: {{ value }}
85
- {% endfor - %}
125
+ {% endfor %}
86
126
{% endif %}
0 commit comments