Skip to content

Commit 8500b9b

Browse files
committed
Ensure /data/db directory on debina
It appears that standard mongo install process on debian doesn't create the /data/db directory. This prevents mongo process from starting and required manual job on the server. With this fix the /data/db directory will be created by ansible during install process.
1 parent 53b969c commit 8500b9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tasks/install.deb.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
apt_repository: repo="{{mongodb_repository}}" update_cache=yes
2828
when: '"mongodb-org" in mongodb_package'
2929

30+
- name: Endure /data directory
31+
file: path=/data/db state=directory owner=mongodb recurse=yes
32+
3033
- name: Install MongoDB package
3134
apt: name={{item}} state=present
3235
with_items:

0 commit comments

Comments
 (0)