mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-25 04:28:57 +00:00
19 lines
631 B
YAML
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
|