ansible-role-mongodb/tasks/configure.yml
2014-12-19 17:39:09 +03:00

19 lines
631 B
YAML

---
- name: Configure mongodb
template: src=mongod.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0644
notify: mongodb restart
- name: Configure log rotation
template: src=logrotate.conf.j2 dest=/etc/logrotate.d/mongodb.conf
when: mongodb_logrotate
- name: Create mongodb user
user: name={{mongodb_user}} group={{mongodb_user}}
- name: Configure database directory
file: state=directory path={{ mongodb_conf_dbpath }} owner={{mongodb_user}} group={{mongodb_user}} mode=0755
- name: Configure logs
file: state=file path={{ mongodb_conf_logpath }} owner={{mongodb_user}} group={{mongodb_user}} mode=0644