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
edx
configuration
Commits
b4c934e2
Commit
b4c934e2
authored
Oct 10, 2017
by
Joseph Mulloy
Committed by
GitHub
Oct 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4124 from edx/jdmulloy/ops2117/mongo32_runbook
Jdmulloy/ops2117/mongo32 runbook
parents
49a6c930
52c0f0b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
playbooks/library/mongodb_replica_set
+6
-0
playbooks/roles/mongo_3_2/tasks/main.yml
+9
-6
No files found.
playbooks/library/mongodb_replica_set
View file @
b4c934e2
...
...
@@ -351,6 +351,12 @@ def validate_args():
if
(
username
and
not
password
)
or
(
password
and
not
username
):
module
.
fail_json
(
msg
=
"Must provide both username and password or neither."
)
# Check that if votes is 0 priority is also 0
for
member
in
module
.
params
.
get
(
'rs_config'
)
.
get
(
'members'
):
if
member
.
get
(
'votes'
)
==
0
and
member
.
get
(
'priority'
)
!=
0
:
module
.
fail_json
(
msg
=
"Non-voting member {} must have priority 0"
.
format
(
member
[
'host'
]))
return
module
...
...
playbooks/roles/mongo_3_2/tasks/main.yml
View file @
b4c934e2
...
...
@@ -134,6 +134,8 @@
-
"
install"
-
"
install:app-configuration"
-
"
update_mongod_conf"
-
"
manage"
-
"
manage:db-replication"
# If either auth or unauthed access comes back with a replica set, we
# do not want to initialize one. Since initialization requires a bunch
...
...
@@ -178,6 +180,8 @@
backup
:
yes
register
:
update_mongod_conf
tags
:
-
"
install"
-
"
install:app-configuration"
-
"
manage"
-
"
manage:db-replication"
-
"
update_mongod_conf"
...
...
@@ -199,6 +203,7 @@
tags
:
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
-
name
:
wait for mongo server to start
wait_for
:
...
...
@@ -207,6 +212,7 @@
tags
:
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
# We only try passwordless superuser creation when
# we're initializing the replica set and need to use
...
...
@@ -226,7 +232,7 @@
run_once
:
true
tags
:
-
"
manage"
-
"
manage:db"
-
"
manage:db
-replication
"
# Now that the localhost exemption has been used to create the superuser, we need
# to add replica set to our configuration. This will never happen if we detected
...
...
@@ -236,8 +242,6 @@
skip_replica_set
:
false
when
:
initialize_replica_set
tags
:
-
"
install"
-
"
install:app-configuration"
-
"
manage"
-
"
manage:db-replication"
...
...
@@ -258,7 +262,6 @@
when
:
initialize_replica_set
tags
:
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
-
name
:
wait for mongo server to start
...
...
@@ -268,7 +271,6 @@
when
:
initialize_replica_set
tags
:
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
-
name
:
configure replica set
...
...
@@ -282,6 +284,7 @@
-
"
manage"
-
"
manage:db"
-
"
manage:db-replication"
-
"
manage:db-replication-configuration"
# During initial replica set configuration, it can take a few seconds to vote
# a primary and for all members to reflect that status. During that window,
...
...
@@ -318,6 +321,7 @@
tags
:
-
"
manage"
-
"
manage:db"
-
"
manage:db-users"
-
"
manage:db-replication"
-
name
:
ensure mongo starts at boot time
...
...
@@ -327,4 +331,3 @@
tags
:
-
"
manage"
-
"
manage:start"
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