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: "" 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: 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 %}