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