Skip to content

Commit 293d820

Browse files
authored
Merge pull request #88 from neilime/patch-1
Supports setParameter configuration
2 parents 54a2e1e + d894c84 commit 293d820

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ mongodb_replication_replset: # Enable replication <setname>
8787
mongodb_replication_replindexprefetch: "all" # specify index prefetching behavior (if secondary) [none|_id_only|all]
8888
mongodb_replication_oplogsize: 1024 # specifies a maximum size in megabytes for the replication operation log
8989

90+
## setParameter options
91+
# Configure setParameter option.
92+
# Example :
93+
mongodb_set_parameters: { "enableLocalhostAuthBypass": "true", "authenticationMechanisms": "SCRAM-SHA-1,MONGODB-CR" }
94+
9095
# MMS Agent
9196
mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb
9297
mongodb_mms_group_id: ""

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ mongodb_root_admin_password: passw0rd
9797

9898
mongodb_root_backup_name: "backupuser"
9999
mongodb_root_backup_password: "passw0rd"
100+
101+
# setParameter config
102+
mongodb_set_parameters:

templates/mongod.conf.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ systemLog:
5555
destination: {{ mongodb_systemlog_destination }}
5656
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
5757
path: {{ mongodb_systemlog_path }}
58+
59+
{% if mongodb_set_parameters -%}
60+
setParameter:
61+
{% for key, value in mongodb_set_parameters.items() -%}
62+
{{ key }}: {{ value }}
63+
{% endfor -%}
64+
{% endif %}

0 commit comments

Comments
 (0)