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.
This commit is contained in:
Dariusz Łuksza 2015-07-25 11:46:34 +02:00 committed by Sergei Antipov
parent 1cdf7e255a
commit 183e6d485f
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@
apt_repository: repo="{{mongodb_repository}}" update_cache=yes
when: '"mongodb-org" in mongodb_package'
- name: Endure /data directory
file: path=/data/db state=directory owner=mongodb recurse=yes
- name: Install MongoDB package
apt: name={{item}} state=present
with_items: