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
c9f34533
Commit
c9f34533
authored
Oct 23, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating mongo role for new directory structure
parent
29e5e42c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
playbooks/roles/mongo/defaults/main.yml
+3
-1
playbooks/roles/mongo/tasks/main.yml
+9
-10
No files found.
playbooks/roles/mongo/defaults/main.yml
View file @
c9f34533
...
...
@@ -4,7 +4,9 @@ mongo_logappend: true
mongo_version
:
2.4.7
mongo_bind_ip
:
127.0.0.1
mongo_extra_conf
:
'
'
mongo_data_dir
:
"
{{
data_dir
}}/mongo"
mongo_app_dir
:
"
{{
app_dir
}}/mongo"
mongo_user
:
mongodb
MONGO_USERS
:
-
user
:
cs_comments_service
password
:
password
...
...
playbooks/roles/mongo/tasks/main.yml
View file @
c9f34533
---
-
name
:
mongo | install python pymongo for mongo_user ansible module
pip
:
>
name=pymongo
state=present
version=2.6.3
extra_args="-i {{ PYPI_MIRROR_URL }}"
tags
:
mongo
-
name
:
mongo | add the mongodb signing key
apt_key
:
>
...
...
@@ -26,30 +26,30 @@
install_recommends=yes
update_cache=yes
-
name
:
mongo | create mongo data dir
file
:
>
path="{{ mongo_data_dir }}"
state=directory
owner="{{ mongo_user }}"
-
name
:
mongo | stop mongo service
service
:
name=mongodb state=stopped
tags
:
mongo
-
name
:
mongo | move mongodb to {{ data_dir }}
command
:
mv /var/lib/mongodb {{ data_dir}}/. creates={{ data_dir }}/mongodb
tags
:
mongo
-
name
:
mongo | move mongodb to {{ mongo_data_dir }}
command
:
mv /var/lib/mongodb {{ mongo_data_dir}}/. creates={{ mongo_data_dir }}/mongodb
-
name
:
mongo | create mongodb symlink
file
:
src={{ data_dir }}/mongodb dest=/var/lib/mongodb state=link
tags
:
mongo
-
name
:
mongo | copy configuration template
template
:
src=mongodb.conf.j2 dest=/etc/mongodb.conf backup=yes
notify
:
restart mongo
tags
:
mongo
-
name
:
mongo | start mongo service
service
:
name=mongodb state=started
tags
:
mongo
-
name
:
mongo | wait for mongo server to start
wait_for
:
port=27017 delay=2
tags
:
mongo
-
name
:
mongo | create a mongodb user
mongodb_user
:
>
...
...
@@ -58,4 +58,3 @@
password={{ item.password }}
state=present
with_items
:
MONGO_USERS
tags
:
mongo
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