mongodb: Fix documentation (#67806)
* Added correct datatypes of parameter * Fixed doc formatting Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
8e31a2fe40
commit
0cd22abe8c
3 changed files with 35 additions and 33 deletions
|
@ -16,72 +16,79 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
'supported_by': 'community'}
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: mongodb_parameter
|
||||
short_description: Change an administrative parameter on a MongoDB server.
|
||||
short_description: Change an administrative parameter on a MongoDB server
|
||||
description:
|
||||
- Change an administrative parameter on a MongoDB server.
|
||||
version_added: "2.1"
|
||||
options:
|
||||
login_user:
|
||||
description:
|
||||
- The username used to authenticate with
|
||||
- The MongoDB username used to authenticate with.
|
||||
type: str
|
||||
login_password:
|
||||
description:
|
||||
- The password used to authenticate with
|
||||
- The login user's password used to authenticate with.
|
||||
type: str
|
||||
login_host:
|
||||
description:
|
||||
- The host running the database
|
||||
- The host running the database.
|
||||
type: str
|
||||
default: localhost
|
||||
login_port:
|
||||
description:
|
||||
- The port to connect to
|
||||
- The MongoDB port to connect to.
|
||||
default: 27017
|
||||
type: int
|
||||
login_database:
|
||||
description:
|
||||
- The database where login credentials are stored
|
||||
- The database where login credentials are stored.
|
||||
type: str
|
||||
replica_set:
|
||||
description:
|
||||
- Replica set to connect to (automatically connects to primary for writes)
|
||||
database:
|
||||
description:
|
||||
- The name of the database to add/remove the user from
|
||||
required: true
|
||||
- Replica set to connect to (automatically connects to primary for writes).
|
||||
type: str
|
||||
ssl:
|
||||
description:
|
||||
- Whether to use an SSL connection when connecting to the database
|
||||
- Whether to use an SSL connection when connecting to the database.
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: no
|
||||
param:
|
||||
description:
|
||||
- MongoDB administrative parameter to modify
|
||||
- MongoDB administrative parameter to modify.
|
||||
type: str
|
||||
required: true
|
||||
value:
|
||||
description:
|
||||
- MongoDB administrative parameter value to set
|
||||
- MongoDB administrative parameter value to set.
|
||||
type: str
|
||||
required: true
|
||||
param_type:
|
||||
description:
|
||||
- Define the parameter value (str, int)
|
||||
- Define the type of parameter value.
|
||||
default: str
|
||||
type: str
|
||||
choices: [int, str]
|
||||
|
||||
notes:
|
||||
- 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
|
||||
- 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 also U(http://api.mongodb.org/python/current/installation.html)
|
||||
requirements: [ "pymongo" ]
|
||||
author: "Loic Blot (@nerzhul)"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Set MongoDB syncdelay to 60 (this is an int)
|
||||
- mongodb_parameter:
|
||||
EXAMPLES = r'''
|
||||
- name: Set MongoDB syncdelay to 60 (this is an int)
|
||||
mongodb_parameter:
|
||||
param: syncdelay
|
||||
value: 60
|
||||
param_type: int
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r'''
|
||||
before:
|
||||
description: value before modification
|
||||
returned: success
|
||||
|
@ -148,8 +155,8 @@ def main():
|
|||
login_port=dict(default=27017, type='int'),
|
||||
login_database=dict(default=None),
|
||||
replica_set=dict(default=None),
|
||||
param=dict(default=None, required=True),
|
||||
value=dict(default=None, required=True),
|
||||
param=dict(required=True),
|
||||
value=dict(required=True),
|
||||
param_type=dict(default="str", choices=['str', 'int']),
|
||||
ssl=dict(default=False, type='bool'),
|
||||
)
|
||||
|
|
|
@ -13,7 +13,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: mongodb_replicaset
|
||||
short_description: Initialises a MongoDB replicaset.
|
||||
short_description: Initialises a MongoDB replicaset
|
||||
description:
|
||||
- Initialises a MongoDB replicaset in a new deployment.
|
||||
- Validates the replicaset name for existing deployments.
|
||||
|
@ -54,6 +54,7 @@ options:
|
|||
- Supply as a simple csv string, i.e. mongodb1:27017,mongodb2:27017,mongodb3:27017.
|
||||
- If a port number is not provided then 27017 is assumed.
|
||||
type: list
|
||||
elements: raw
|
||||
validate:
|
||||
description:
|
||||
- Performs some basic validation on the provided replicaset config.
|
||||
|
@ -299,7 +300,7 @@ def main():
|
|||
login_host=dict(type='str', default="localhost"),
|
||||
login_port=dict(type='int', default=27017),
|
||||
replica_set=dict(type='str', default="rs0"),
|
||||
members=dict(type='list'),
|
||||
members=dict(type='list', elements='raw'),
|
||||
arbiter_at_index=dict(type='int'),
|
||||
validate=dict(type='bool', default=True),
|
||||
ssl=dict(type='bool', default=False),
|
||||
|
|
|
@ -2801,13 +2801,7 @@ lib/ansible/modules/database/misc/riak.py validate-modules:doc-default-does-not-
|
|||
lib/ansible/modules/database/misc/riak.py validate-modules:doc-missing-type
|
||||
lib/ansible/modules/database/misc/riak.py validate-modules:parameter-type-not-in-doc
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py use-argspec-type-path
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py validate-modules:doc-choices-do-not-match-spec
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py validate-modules:doc-missing-type
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py validate-modules:no-default-for-required-parameter
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py validate-modules:nonexistent-parameter-documented
|
||||
lib/ansible/modules/database/mongodb/mongodb_parameter.py validate-modules:parameter-type-not-in-doc
|
||||
lib/ansible/modules/database/mongodb/mongodb_replicaset.py use-argspec-type-path
|
||||
lib/ansible/modules/database/mongodb/mongodb_replicaset.py validate-modules:parameter-list-no-elements
|
||||
lib/ansible/modules/database/mongodb/mongodb_shard.py use-argspec-type-path
|
||||
lib/ansible/modules/database/mongodb/mongodb_user.py use-argspec-type-path
|
||||
lib/ansible/modules/database/mongodb/mongodb_user.py validate-modules:doc-missing-type
|
||||
|
|
Loading…
Reference in a new issue