ansible-role-mongodb/templates/mongod_init.conf.j2

43 lines
1.3 KiB
Plaintext
Raw Normal View History

# {{ ansible_managed }}
2016-04-17 13:43:00 +00:00
net:
bindIp: '127.0.0.1'
http:
enabled: {{ mongodb_net_http_enabled | to_nice_json }}
ipv6: {{ mongodb_net_ipv6 | to_nice_json }}
maxIncomingConnections: {{ mongodb_net_maxconns }}
port: {{ mongodb_net_port }}
processManagement:
fork: {{ mongodb_processmanagement_fork | to_nice_json }}
2016-04-17 13:43:00 +00:00
security:
authorization: 'disabled'
storage:
dbPath: {{ mongodb_storage_dbpath }}
{% if mongodb_major_version|float >= 3.0 -%}
2016-04-17 13:43:00 +00:00
engine: {{ mongodb_storage_engine }}
{% endif -%}
journal:
enabled: {{ mongodb_storage_journal_enabled | to_nice_json }}
{% if mongodb_storage_engine == 'mmapv1' -%}
mmapv1:
quota:
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' -%}
2016-04-17 13:43:00 +00:00
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:
destination: {{ mongodb_systemlog_destination }}
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
path: {{ mongodb_systemlog_path }}