From c4b37649eeab5b670ecce849976a6da8a600455b Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 9 Jan 2018 12:39:07 +0100 Subject: [PATCH 1/3] Supports setParameter configuration --- templates/mongod.conf.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/mongod.conf.j2 b/templates/mongod.conf.j2 index ab19f0f..2ff5617 100644 --- a/templates/mongod.conf.j2 +++ b/templates/mongod.conf.j2 @@ -55,3 +55,10 @@ systemLog: destination: {{ mongodb_systemlog_destination }} logAppend: {{ mongodb_systemlog_logappend | to_nice_json }} path: {{ mongodb_systemlog_path }} + +{% if mongodb_set_parameters -%} +setParameter: + {% for key, value in mongodb_set_parameters.items() -%} + {{ key }}: {{ value }} + {% endfor -%} +{% endif %} From ceffd529e6de129d65e1ad17adce0f864d5936c5 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 9 Jan 2018 12:41:48 +0100 Subject: [PATCH 2/3] Add default mongodb_set_parameters var --- defaults/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 4f81ac2..07d217b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -97,3 +97,6 @@ mongodb_root_admin_password: passw0rd mongodb_root_backup_name: "backupuser" mongodb_root_backup_password: "passw0rd" + +# setParameter config +mongodb_set_parameters: From d894c8412cc5783f6bd2a8f17d1c8200ad8e265b Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 9 Jan 2018 12:44:53 +0100 Subject: [PATCH 3/3] Add doc for mongodb_set_parameters var --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7d5b569..2affb12 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,11 @@ mongodb_replication_replset: # Enable replication mongodb_replication_replindexprefetch: "all" # specify index prefetching behavior (if secondary) [none|_id_only|all] mongodb_replication_oplogsize: 1024 # specifies a maximum size in megabytes for the replication operation log +## setParameter options +# Configure setParameter option. +# Example : +mongodb_set_parameters: { "enableLocalhostAuthBypass": "true", "authenticationMechanisms": "SCRAM-SHA-1,MONGODB-CR" } + # MMS Agent mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb mongodb_mms_group_id: ""