diff --git a/mongodb-org/tasks/main.yml b/mongodb-org/tasks/main.yml index bb38f6fe..f5e08022 100644 --- a/mongodb-org/tasks/main.yml +++ b/mongodb-org/tasks/main.yml @@ -32,6 +32,16 @@ when: mongodb_install_conf tags: mongodb +- name: Create the mongodb db directory + file: dest={{ mongodb_dbpath }} state=directory owner={{ mongodb_user }} group={{ mongodb_group }} mode=0755 + when: mongodb_install_conf + tags: mongodb + +- name: Create the mongodb log directory + file: dest={{ mongodb_logdir }} state=directory owner={{ mongodb_user }} group={{ mongodb_group }} mode=0755 + when: mongodb_install_conf + tags: mongodb + - name: Install the cron job that manages log files rotation template: src=mongo_log_rotate.sh.j2 dest=/etc/cron.daily/mongo_log_rotate owner=root group=root mode=0555 tags: mongodb