Skip to content

Commit 0dd9e51

Browse files
authored
Merge pull request #129 from pdreker/dir-per-db
Add "DirectoryPerDB" parameter
2 parents 5e349fb + dba6278 commit 0dd9e51

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ mongodb_security_keyfile: /etc/mongodb-keyfile # Specify path to keyfile with
6464

6565
## storage Options
6666
mongodb_storage_dbpath: /data/db # Directory for datafiles
67+
mongodb_storage_dirperdb: false # Use one directory per DB
68+
6769
# The storage engine for the mongod database. Available values:
6870
# 'mmapv1', 'wiredTiger'
6971
mongodb_storage_engine: "{{ 'mmapv1' if mongodb_version[0:3] == '3.0' else 'wiredTiger' }}"

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ mongodb_security_keyfile: /etc/mongodb-keyfile # Specify path to keyfile with
4141

4242
## storage Options
4343
mongodb_storage_dbpath: /data/db # Directory for datafiles
44+
mongodb_storage_dirperdb: false # Use one directory per DB
45+
4446
# The storage engine for the mongod database. Available values:
4547
# 'mmapv1', 'wiredTiger'
4648
mongodb_storage_engine: "wiredTiger"

templates/mongod.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ security:
3838

3939
storage:
4040
dbPath: {{ mongodb_storage_dbpath }}
41+
directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }}
4142
{% if mongodb_major_version | version_compare("3.0", ">=") -%}
4243
engine: {{ mongodb_storage_engine }}
4344
{% endif -%}

templates/mongod_init.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ security:
2121

2222
storage:
2323
dbPath: {{ mongodb_storage_dbpath }}
24+
directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }}
2425
{% if mongodb_major_version | version_compare("3.0", ">=") -%}
2526
engine: {{ mongodb_storage_engine }}
2627
{% endif -%}

0 commit comments

Comments
 (0)