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 }
|
- { name: mongodb }
|
||||||
when: not mongodb_enabled
|
when: not mongodb_enabled
|
||||||
|
|
||||||
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate these 256MB files
|
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate
|
||||||
- name: remove journal prealloc files
|
# these 256MB files. Brute Force Idea: rm /var/lib/mongodb/journal/prealloc.*
|
||||||
shell: rm /var/lib/mongodb/journal/prealloc.*
|
- name: find /var/lib/mongodb/prealloc.* files to delete
|
||||||
when: not mongodb_enabled
|
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
|
- name: add mongodb to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
Loading…
Reference in a new issue