From 8500b9b1ede21f7874c3f62bbb714ea2715b750f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20=C5=81uksza?= Date: Sat, 25 Jul 2015 11:46:34 +0200 Subject: [PATCH] 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. --- tasks/install.deb.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/install.deb.yml b/tasks/install.deb.yml index f846a22..4a24509 100644 --- a/tasks/install.deb.yml +++ b/tasks/install.deb.yml @@ -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: