| {%- from "mongodb/map.jinja" import server with context %} |
| # mongodb.conf |
| |
| # for documentation of all options, see: |
| # http://docs.mongodb.org/manual/reference/configuration-options/ |
| |
| port={{ server.bind.port }} |
| bind_ip={{ server.bind.address }} |
| |
| logpath=/var/log/mongodb/mongod.log |
| logappend=true |
| |
| dbpath=/var/lib/mongodb |
| journal=true |
| |
| # Disable journal preallocation for predictable service start time |
| nopreallocj=true |
| |
| {%- if server.authorization.get('enabled', False) %} |
| auth=true |
| {%- endif %} |
| {%- if server.shared_key is defined %} |
| keyFile=/etc/mongodb.key |
| {%- endif %} |
| |
| {%- if server.replica_set is defined %} |
| replSet={{ server.replica_set }} |
| {%- endif %} |