Mongodb
This commit is contained in:
1 parent
7c16fb5914
commit
5cda2c5eff
3 files changed
+76
No files matched your search
Executable
+26
@@ -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
|
||||
Reference in new issue
Block a user