Fix config for 3.6.x versions

This commit is contained in:
Sergei Antipov 2018-02-16 23:09:00 +07:00
parent b5257ff98f
commit 2fb64ec439
2 changed files with 7 additions and 17 deletions

View File

@ -2,8 +2,10 @@
net:
bindIp: {{ mongodb_net_bindip }}
{% if mongodb_major_version | version_compare("3.6", "<") -%}
http:
enabled: {{ mongodb_net_http_enabled | to_nice_json }}
{% endif -%}
ipv6: {{ mongodb_net_ipv6 | to_nice_json }}
maxIncomingConnections: {{ mongodb_net_maxconns }}
port: {{ mongodb_net_port }}
@ -31,7 +33,7 @@ security:
storage:
dbPath: {{ mongodb_storage_dbpath }}
{% if mongodb_major_version|float >= 3.0 -%}
{% if mongodb_major_version | version_compare("3.0", ">=") -%}
engine: {{ mongodb_storage_engine }}
{% endif -%}
journal:
@ -42,13 +44,6 @@ storage:
enforced: {{ mongodb_storage_quota_enforced | to_nice_json }}
maxFilesPerDB: {{ mongodb_storage_quota_maxfiles }}
smallFiles: {{ mongodb_storage_smallfiles | to_nice_json }}
{% endif -%}
{% if mongodb_major_version == '2.6' -%}
quota:
enforced: {{ mongodb_storage_quota_enforced | to_nice_json }}
maxFilesPerDB: {{ mongodb_storage_quota_maxfiles }}
preallocDataFiles: {{ mongodb_storage_prealloc | to_nice_json }}
smallFiles: {{ mongodb_storage_smallfiles | to_nice_json }}
{% endif %}
systemLog:

View File

@ -2,8 +2,10 @@
net:
bindIp: '127.0.0.1'
{% if mongodb_major_version | version_compare("3.6", "<") -%}
http:
enabled: {{ mongodb_net_http_enabled | to_nice_json }}
{% endif -%}
ipv6: {{ mongodb_net_ipv6 | to_nice_json }}
maxIncomingConnections: {{ mongodb_net_maxconns }}
port: {{ mongodb_net_port }}
@ -13,13 +15,13 @@ processManagement:
{% if mongodb_pidfile_path is defined and mongodb_pidfile_path != '' -%}
pidFilePath: {{ mongodb_pidfile_path }}
{% endif %}
security:
authorization: 'disabled'
storage:
dbPath: {{ mongodb_storage_dbpath }}
{% if mongodb_major_version|float >= 3.0 -%}
{% if mongodb_major_version | version_compare("3.0", ">=") -%}
engine: {{ mongodb_storage_engine }}
{% endif -%}
journal:
@ -30,13 +32,6 @@ storage:
enforced: {{ mongodb_storage_quota_enforced | to_nice_json }}
maxFilesPerDB: {{ mongodb_storage_quota_maxfiles }}
smallFiles: {{ mongodb_storage_smallfiles | to_nice_json }}
{% endif -%}
{% if mongodb_major_version == '2.6' -%}
quota:
enforced: {{ mongodb_storage_quota_enforced | to_nice_json }}
maxFilesPerDB: {{ mongodb_storage_quota_maxfiles }}
preallocDataFiles: {{ mongodb_storage_prealloc | to_nice_json }}
smallFiles: {{ mongodb_storage_smallfiles | to_nice_json }}
{% endif %}
systemLog: