From 6cfef59871cda71a5f10207f738ecf2e0d8f7080 Mon Sep 17 00:00:00 2001 From: Roberto Date: Tue, 25 Sep 2018 11:46:33 +0200 Subject: [PATCH] add condition on security field of configuration file --- mongodb-org/templates/mongod-3.4.conf.j2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 }}