mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
remove prealloc.* in the Ansible way (works even if files absent)
This commit is contained in:
parent
eb2550141b
commit
48b30cc8a7
1 changed files with 13 additions and 4 deletions
|
@ -45,10 +45,19 @@
|
|||
- { name: mongodb }
|
||||
when: not mongodb_enabled
|
||||
|
||||
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate these 256MB files
|
||||
- name: remove journal prealloc files
|
||||
shell: rm /var/lib/mongodb/journal/prealloc.*
|
||||
when: not mongodb_enabled
|
||||
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate
|
||||
# these 256MB files. Brute Force Idea: rm /var/lib/mongodb/journal/prealloc.*
|
||||
- name: find /var/lib/mongodb/prealloc.* files to delete
|
||||
find:
|
||||
paths: /var/lib/mongodb/journal
|
||||
patterns: prealloc.*
|
||||
register: files_to_delete
|
||||
|
||||
- name: delete prealloc files
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ files_to_delete.files }}"
|
||||
|
||||
- name: add mongodb to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
|
|
Loading…
Reference in a new issue