Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
cd42cdf4
Commit
cd42cdf4
authored
Dec 11, 2015
by
Max Rothman
Committed by
Kevin Falcone
Jan 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to more accurate name
parent
b0e95a74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
playbooks/library/mongodb_replica_set
+6
-5
No files found.
playbooks/library/mongodb_r
s_member
→
playbooks/library/mongodb_r
eplica_set
100755 → 100644
View file @
cd42cdf4
...
...
@@ -2,11 +2,12 @@
DOCUMENTATION
=
"""
---
module: mongo
_rs_member
module: mongo
db_replica_set
short_description: Modify replica set config.
description:
- 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"
author:
- Max Rothman
...
...
@@ -54,7 +55,7 @@ options:
EXAMPLES
=
'''
- name: Basic example
mongo
_rs_member
:
mongo
db_replica_set
:
username: root
password: password
rs_config:
...
...
@@ -65,7 +66,7 @@ EXAMPLES = '''
hidden: true
- name: Fully specify a whole document
mongo
_rs_member
:
mongo
db_replica_set
:
username: admin
password: password
rs_config:
...
...
@@ -149,7 +150,7 @@ def set_member_ids(members, old_members=None):
return
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'
]]
return
match
[
0
]
if
len
(
match
)
>
0
else
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment