diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-11-21 17:24:23 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-11-21 17:24:23 +0800 |
commit | cb466cc23049bfd1f2ebee721e5f1c6841ade9e0 (patch) | |
tree | 2a9e1f2bccc97963f5b2db33a7a890e5ebe27b9d | |
parent | 0a324e03a0d39bb205c43b6544740d2d9d9d9144 (diff) |
deploy mongodb to qtip dashboard server
add ansible code to deploy mongodb in qtip dashboard server
JIRA: QTIP-166
Change-Id: Icce4ac10b00ecf7679ff89204cb8a95cd1919151
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
-rw-r--r-- | opt/servers/inventory | 5 | ||||
-rw-r--r-- | opt/servers/mongo.yml | 4 | ||||
-rw-r--r-- | opt/servers/roles/mongo/tasks/main.yml | 10 |
3 files changed, 18 insertions, 1 deletions
diff --git a/opt/servers/inventory b/opt/servers/inventory index 20afa528..f038d877 100644 --- a/opt/servers/inventory +++ b/opt/servers/inventory @@ -1,4 +1,4 @@ -qtip-dev ansible_host=54.209.126.178 +qtip-dev ansible_host=dev.qtip.io [elk-servers] qtip-dev @@ -11,3 +11,6 @@ qtip-dev [testapi-servers] qtip-dev + +[mongo-servers] +qtip-dev diff --git a/opt/servers/mongo.yml b/opt/servers/mongo.yml new file mode 100644 index 00000000..e64c0c69 --- /dev/null +++ b/opt/servers/mongo.yml @@ -0,0 +1,4 @@ +--- +- hosts: mongo-servers + roles: + - mongo diff --git a/opt/servers/roles/mongo/tasks/main.yml b/opt/servers/roles/mongo/tasks/main.yml new file mode 100644 index 00000000..81fb49b5 --- /dev/null +++ b/opt/servers/roles/mongo/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: pulling mongo + become: true + docker_image: name=mongo:3.2.1 state=present + +- name: setting up mongo + become: true + docker_container: + name: mongo + image: mongo:3.2.1 |