diff --git a/mongodb-org/templates/mongod-3.4.conf.j2 b/mongodb-org/templates/mongod-3.4.conf.j2 index ab9f1c7d..ac37fdcd 100644 --- a/mongodb-org/templates/mongod-3.4.conf.j2 +++ b/mongodb-org/templates/mongod-3.4.conf.j2 @@ -42,15 +42,16 @@ net: {% endif %} #processManagement: - +{% if mongodb_authorization_enabled or mongodb_cluster_enabled %} security: -{% if mongodb_authentication_enabled %} +{% endif %} + +{% if mongodb_authorization_enabled %} authorization: enabled {% endif %} {%if mongodb_cluster_enabled %} keyFile: {{ mongodb_replica_keyfile }} - replication: oplogSizeMB: {{ mongodb_oplog_size }} replSetName: {{ mongodb_replicaset }}