create required directories
This commit is contained in:
parent
9a716d6625
commit
e373d9f052
@ -2,8 +2,12 @@
|
|||||||
mongodb_version: 3.6
|
mongodb_version: 3.6
|
||||||
mongodb_system_user: mongod
|
mongodb_system_user: mongod
|
||||||
mongodb_system_group: mongod
|
mongodb_system_group: mongod
|
||||||
mongodb_storage_dbpath: /var/lib/mongo
|
|
||||||
|
|
||||||
|
|
||||||
# mongodb_system_gid: omit
|
# mongodb_system_gid: omit
|
||||||
# mongodb_system_uid: omit
|
# mongodb_system_uid: omit
|
||||||
|
|
||||||
|
mongodb_storage_dbpath: /var/lib/mongo
|
||||||
|
mongodb_storage_journal_enabled: True
|
||||||
|
|
||||||
|
mongodb_systemlog_destination: syslog
|
||||||
|
mongodb_systemlog_logappend: True
|
||||||
|
mongodb_systemlog_path: /var/log/mongodb/mongod.log
|
||||||
|
@ -29,12 +29,14 @@
|
|||||||
|
|
||||||
- name: Create db storage dir at '{{ mongodb_storage_dbpath }}'
|
- name: Create db storage dir at '{{ mongodb_storage_dbpath }}'
|
||||||
file:
|
file:
|
||||||
path: "{{ mongodb_storage_dbpath }}"
|
path: "{{ item }}"
|
||||||
owner: "{{ mongodb_system_user }}"
|
owner: "{{ mongodb_system_user }}"
|
||||||
group: "{{ mongodb_system_group }}"
|
group: "{{ mongodb_system_group }}"
|
||||||
follow: yes
|
|
||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- "{{ mongodb_storage_dbpath }}"
|
||||||
|
- "{{ mongodb_systemlog_path | dirname if mongodb_systemlog_destination == 'file'}}"
|
||||||
|
|
||||||
# - name: Make sure mongodb is running
|
# - name: Make sure mongodb is running
|
||||||
# systemd:
|
# systemd:
|
||||||
|
Loading…
Reference in New Issue
Block a user