Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mongodb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible
roles
mongodb
Commits
0d455686
Verified
Commit
0d455686
authored
4 years ago
by
nd
Browse files
Options
Downloads
Patches
Plain Diff
fix mongodb config
parent
53714e2c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/main.yml
+4
-10
4 additions, 10 deletions
tasks/main.yml
templates/mongod.conf.j2
+44
-0
44 additions, 0 deletions
templates/mongod.conf.j2
vars/main.yml
+2
-0
2 additions, 0 deletions
vars/main.yml
with
50 additions
and
10 deletions
tasks/main.yml
+
4
−
10
View file @
0d455686
-
name
:
install mongodb
-
name
:
copy mongodb config
apt
:
pkg
:
-
mongodb-org
-
name
:
enable replication sets
notify
:
notify
:
-
restart mongodb
-
restart mongodb
-
start mongodb replication
-
start mongodb replication
lineinfile
:
template
:
path
:
/etc/mongod.conf
dest
:
/etc/mongod.conf
regexp
:
"
^#replication:"
src
:
mongod.conf.j2
line
:
"
replication:
\n
replSetName:
rs01"
-
name
:
start and enable mongodb
-
name
:
start and enable mongodb
systemd
:
systemd
:
...
...
This diff is collapsed.
Click to expand it.
templates/mongod.conf.j2
0 → 100644
+
44
−
0
View file @
0d455686
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#security:
#operationProfiling:
replication:
replSetName: rs01
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
This diff is collapsed.
Click to expand it.
vars/main.yml
+
2
−
0
View file @
0d455686
packages
:
packages
:
pkgs
:
"
mongodb-org"
:
{}
repos
:
repos
:
mongodb
:
mongodb
:
url
:
"
deb
http://repo.mongodb.org/apt/debian
{{
ansible_distribution_release|lower
}}/mongodb-org/{{
mongodb.version
}}
main"
url
:
"
deb
http://repo.mongodb.org/apt/debian
{{
ansible_distribution_release|lower
}}/mongodb-org/{{
mongodb.version
}}
main"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment