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
357f7e3b
Commit
357f7e3b
authored
Aug 18, 2017
by
Joseph Mulloy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change tags to work with docker
parent
6f3f24fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
38 deletions
+45
-38
playbooks/roles/mongo_3_2/tasks/main.yml
+45
-38
No files found.
playbooks/roles/mongo_3_2/tasks/main.yml
View file @
357f7e3b
...
...
@@ -9,7 +9,7 @@
tags
:
-
"
hugepages"
-
"
install"
-
"
install:
system-requirements
"
-
"
install:
configuration
"
-
name
:
Enable/start disable transparent huge pages service (http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/)
service
:
...
...
@@ -18,8 +18,8 @@
state
:
started
tags
:
-
"
hugepages"
-
"
install
"
-
"
install:system-requirements
"
-
"
manage
"
-
"
manage:start
"
-
name
:
install python pymongo for mongo_user ansible module
pip
:
...
...
@@ -29,7 +29,7 @@
extra_args
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
tags
:
-
"
install"
-
"
install:
system
-requirements"
-
"
install:
app
-requirements"
-
name
:
add the mongodb signing key
apt_key
:
...
...
@@ -38,7 +38,7 @@
state
:
present
tags
:
-
"
install"
-
"
install:
system
-requirements"
-
"
install:
app
-requirements"
-
name
:
add the mongodb repo to the sources list
apt_repository
:
...
...
@@ -46,7 +46,8 @@
state
:
present
tags
:
-
"
install"
-
"
install:system-requirements"
-
"
install:app-requirements"
-
"
mongo_packages"
-
name
:
install mongo server and recommends
apt
:
...
...
@@ -57,9 +58,9 @@
update_cache
:
yes
with_items
:
"
{{
mongodb_debian_pkgs
}}"
tags
:
-
install
-
install:app-requirements
-
mongo_packages
-
"
install"
-
"
install:app-requirements"
-
"
mongo_packages"
-
name
:
create mongo dirs
file
:
...
...
@@ -74,7 +75,7 @@
-
"
{{
mongo_journal_dir
}}"
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:
app-
configuration"
-
name
:
add serverStatus logging script
template
:
...
...
@@ -86,7 +87,7 @@
when
:
MONGO_LOG_SERVERSTATUS
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:
app-
configuration"
-
name
:
add serverStatus logging script to cron
cron
:
...
...
@@ -97,7 +98,7 @@
when
:
MONGO_LOG_SERVERSTATUS
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:
app-
configuration"
# This will error when run on a new replica set, so we ignore_errors
# and connect anonymously next.
...
...
@@ -110,8 +111,8 @@
register
:
authed_replica_set_already_configured
ignore_errors
:
true
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
name
:
Try checking the replica set with no user/pass in case this is a new box
mongodb_rs_status
:
...
...
@@ -121,8 +122,8 @@
when
:
authed_replica_set_already_configured.failed is defined
ignore_errors
:
true
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
# We use these in the templates but also to control a whole bunch of logic
-
name
:
set facts that default to not initializing a replica set
...
...
@@ -131,7 +132,7 @@
skip_replica_set
:
false
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:
app-
configuration"
-
"
update_mongod_conf"
# If either auth or unauthed access comes back with a replica set, we
...
...
@@ -145,15 +146,15 @@
when
:
authed_replica_set_already_configured.status is not defined
and unauthed_replica_set_already_configured.status is not defined
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
name
:
warn about unconfigured replica sets
debug
:
msg="You do not appear to have a Replica Set configured, deploying one for you"
when
:
initialize_replica_set
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
name
:
copy mongodb key file
copy
:
...
...
@@ -164,8 +165,8 @@
group
:
mongodb
register
:
update_mongod_key
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
"
mongodb_key"
# If skip_replica_set is true, this template will not contain a replica set stanza
...
...
@@ -177,8 +178,8 @@
backup
:
yes
register
:
update_mongod_conf
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
"
update_mongod_conf"
-
name
:
install logrotate configuration
...
...
@@ -187,7 +188,7 @@
dest
:
/etc/logrotate.d/hourly/mongo
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:
app-
configuration"
-
"
logrotate"
-
name
:
restart mongo service if we changed our configuration
...
...
@@ -196,16 +197,16 @@
state
:
restarted
when
:
update_mongod_conf.changed or update_mongod_key.changed
tags
:
-
"
install
"
-
"
install:configuration
"
-
"
manage
"
-
"
manage:start
"
-
name
:
wait for mongo server to start
wait_for
:
port
:
27017
delay
:
2
tags
:
-
"
install
"
-
"
install:configuration
"
-
"
manage
"
-
"
manage:start
"
# We only try passwordless superuser creation when
# we're initializing the replica set and need to use
...
...
@@ -250,7 +251,9 @@
when
:
initialize_replica_set
tags
:
-
"
install"
-
"
install:configuration"
-
"
install:app-configuration"
-
"
manage"
-
"
manage:db-replication"
-
name
:
re-copy configuration template with replica set enabled
template
:
...
...
@@ -259,8 +262,8 @@
backup
:
yes
when
:
initialize_replica_set
tags
:
-
"
install
"
-
"
install:configur
ation"
-
"
manage
"
-
"
manage:db-replic
ation"
-
name
:
restart mongo service
service
:
...
...
@@ -268,8 +271,9 @@
state
:
restarted
when
:
initialize_replica_set
tags
:
-
"
install"
-
"
install:configuration"
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
-
name
:
wait for mongo server to start
wait_for
:
...
...
@@ -277,8 +281,9 @@
delay
:
2
when
:
initialize_replica_set
tags
:
-
"
install"
-
"
install:configuration"
-
"
manage"
-
"
manage:start"
-
"
manage:db-replication"
-
name
:
configure replica set
mongodb_replica_set
:
...
...
@@ -290,7 +295,7 @@
tags
:
-
"
manage"
-
"
manage:db"
-
"
configure_replica_set
"
-
"
manage:db-replication
"
# 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,
...
...
@@ -309,6 +314,7 @@
tags
:
-
"
manage"
-
"
manage:db"
-
"
manage:db-replication"
-
name
:
create mongodb users in a replica set
mongodb_user
:
...
...
@@ -326,3 +332,4 @@
tags
:
-
"
manage"
-
"
manage:db"
-
"
manage:db-replication"
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