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