This commit is contained in:
tanshu committed 2020-05-04 17:05:08 +05:30
1 parent 7c16fb5914
commit 5cda2c5eff
3 files changed
+76

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#################################################
# DO Community Playbooks: MongoDB
#################################################
---
- hosts: all
become: true
vars_files:
- vars/default.yml
tasks:
- name: Pull default MongoDB image
docker_image:
name: "{{ mongo_image }}"
source: pull
- name: Create MongoDB container
docker_container:
name: "{{ mongo_name }}"
image: "{{ mongo_image }}"
state: started
restart_policy: "unless-stopped"
published_ports:
- 27071:27071
volumes:
- /var/lib/mongodb/data:/data/db
- /var/lib/mongodb/dump:/dump