W3cubDocs

/Ansible

mongodb_parameter - Change an administrative parameter on a MongoDB server.

New in version 2.1.

Synopsis

Change an administrative parameter on a MongoDB server.

Requirements (on host that executes module)

  • pymongo

Options

parameter required default choices comments
database
yes
The name of the database to add/remove the user from
login_database
no
The database where login credentials are stored
login_host
no localhost
The host running the database
login_password
no
The password used to authenticate with
login_port
no 27017
The port to connect to
login_user
no
The username used to authenticate with
param
yes
MongoDB administrative parameter to modify
param_type
no str
Define the parameter value (str, int)
replica_set
no
Replica set to connect to (automatically connects to primary for writes)
ssl
no
Whether to use an SSL connection when connecting to the database
value
yes
MongoDB administrative parameter value to set

Examples

# Set MongoDB syncdelay to 60 (this is an int)
- mongodb_parameter: param="syncdelay" value=60 param_type="int"

Return Values

Common return values are documented here Common Return Values, the following are the fields unique to this module:

name description returned type sample
after value after modification success string
before value before modification success string

Notes

Note

Requires the pymongo Python package on the remote host, version 2.4.2+. This can be installed using pip or the OS package manager. @see http://api.mongodb.org/python/current/installation.html

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/mongodb_parameter_module.html