fix when conditions
This commit is contained in:
parent
b9587b4762
commit
8a6a2042f3
@ -27,16 +27,25 @@
|
||||
group: "{{ mongodb_system_group }}"
|
||||
notify: __mongod_restart
|
||||
|
||||
- name: Create required directories
|
||||
- name: Create db storage dir '{{ mongodb_storage_dbpath }}'
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
path: "{{ mongodb_storage_dbpath }}"
|
||||
owner: "{{ mongodb_system_user }}"
|
||||
group: "{{ mongodb_system_group }}"
|
||||
recurse: yes
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ mongodb_storage_dbpath }}"
|
||||
- "{{ mongodb_systemlog_path | dirname when mongodb_systemlog_destination }}"
|
||||
|
||||
- name: Create log dir '{{ mongodb_systemlog_path | dirname }}'
|
||||
file:
|
||||
path: "{{ mongodb_systemlog_path | dirname }}"
|
||||
owner: "{{ mongodb_system_user }}"
|
||||
group: "{{ mongodb_system_group }}"
|
||||
recurse: yes
|
||||
state: directory
|
||||
when: mongodb_systemlog_destination == 'logfile'
|
||||
|
||||
|
||||
- "{{ mongodb_systemlog_path | dirname when mongodb_systemlog_destination == 'file' else omit}}"
|
||||
|
||||
# - name: Make sure mongodb is running
|
||||
# systemd:
|
||||
|
Loading…
Reference in New Issue
Block a user