diff --git a/templates/mongod.conf.j2 b/templates/mongod.conf.j2 index fe63128..cd9ae23 100644 --- a/templates/mongod.conf.j2 +++ b/templates/mongod.conf.j2 @@ -66,8 +66,10 @@ storage: dbPath: {{ mongodb_storage_dbpath }} directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }} engine: {{ mongodb_storage_engine }} + {% if mongodb_major_version is version("7.0", "<") -%} journal: enabled: {{ mongodb_storage_journal_enabled | to_nice_json }} + {% endif -%} {% if mongodb_storage_engine == 'mmapv1' -%} mmapv1: quota: diff --git a/templates/mongod_init.conf.j2 b/templates/mongod_init.conf.j2 index eaf1779..202130c 100644 --- a/templates/mongod_init.conf.j2 +++ b/templates/mongod_init.conf.j2 @@ -23,8 +23,10 @@ storage: dbPath: {{ mongodb_storage_dbpath }} directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }} engine: {{ mongodb_storage_engine }} + {% if mongodb_major_version is version("7.0", "<") -%} journal: enabled: {{ mongodb_storage_journal_enabled | to_nice_json }} + {% endif -%} {% if mongodb_storage_engine == 'mmapv1' -%} mmapv1: quota: