Documentation

mongodb_parameter - Change an administrative parameter on a MongoDB server.

New in version 2.1.

Synopsis

  • Change an administrative parameter on a MongoDB server.

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 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

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

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