Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Ant_Devops
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mayi-operation
Ant_Devops
Commits
560c560d
Commit
560c560d
authored
Feb 18, 2019
by
ChongmingDu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mongo mod
parent
e9d373e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
14 deletions
+22
-14
roles/base/files/init.sh
+2
-14
roles/mongodb/files/mongo4.repo
+7
-0
roles/mongodb/handlers/main.yml
+4
-0
roles/mongodb/tasks/main.yml
+9
-0
No files found.
roles/base/files/init.sh
View file @
560c560d
...
...
@@ -52,16 +52,4 @@ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo
yum-config-manager
--add-repo
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo
yum makecache fast
sudo
yum install docker-ce-17.12.1.ce-1.el7.centos
-y
systemctl start docker&&systemctl
enable
docker
# Install mongod4
# cat << EOF > /etc/yum.repos.d/mongo4.repo
# [mongodb-org-4.0]
# name=MongoDB Repository
# baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
# gpgcheck=1
# enabled=1
# gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
# EOF
# sudo yum install -y mongodb-org &>/dev/null
# systemctl start mongod.service&&systemctl enable mongod.service
\ No newline at end of file
systemctl start docker&&systemctl
enable
docker
\ No newline at end of file
roles/mongodb/files/mongo4.repo
0 → 100644
View file @
560c560d
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
\ No newline at end of file
roles/mongodb/handlers/main.yml
0 → 100644
View file @
560c560d
---
-
name
:
"
restart
mongo"
service
:
name=mongod state=restarted enabled=yes
\ No newline at end of file
roles/mongodb/tasks/main.yml
0 → 100644
View file @
560c560d
---
-
name
:
"
add
mongo
repo"
copy
:
src
:
mongo4.repo
dest
:
/etc/yum.repos.d/mongo4.repo
-
name
:
"
install
mongo"
shell
:
yum install mongodb-org -y
\ No newline at end of file
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