Commit eac82017 by Max Rothman

Switch to more accurate name

parent b5b768df
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
DOCUMENTATION = """ DOCUMENTATION = """
--- ---
module: mongo_rs_member module: mongodb_replica_set
short_description: Modify replica set config. short_description: Modify replica set config.
description: description:
- Modify replica set config, including modifing/adding/removing members from a replica set - Modify replica set config, including modifing/adding/removing members from a replica set
and changing replica set options. Uses replSetReconfig and replSetInitiate. changing replica set options, and initiating the replica set if necessary.
Uses replSetReconfig and replSetInitiate.
version_added: "1.9" version_added: "1.9"
author: author:
- Max Rothman - Max Rothman
...@@ -54,7 +55,7 @@ options: ...@@ -54,7 +55,7 @@ options:
EXAMPLES = ''' EXAMPLES = '''
- name: Basic example - name: Basic example
mongo_rs_member: mongodb_replica_set:
username: root username: root
password: password password: password
rs_config: rs_config:
...@@ -65,7 +66,7 @@ EXAMPLES = ''' ...@@ -65,7 +66,7 @@ EXAMPLES = '''
hidden: true hidden: true
- name: Fully specify a whole document - name: Fully specify a whole document
mongo_rs_member: mongodb_replica_set:
username: admin username: admin
password: password password: password
rs_config: rs_config:
...@@ -149,7 +150,7 @@ def set_member_ids(members, old_members=None): ...@@ -149,7 +150,7 @@ def set_member_ids(members, old_members=None):
return members return members
def get_matching_member(member, members): def get_matching_member(member, members):
'''Return the rs_member from `members` that "matches" `member`''' '''Return the rs_member from `members` that "matches" `member` (currently on host)'''
match = [m for m in members if m['host'] == member['host']] match = [m for m in members if m['host'] == member['host']]
return match[0] if len(match) > 0 else None return match[0] if len(match) > 0 else None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment