1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

tweaks to get mongodb autotarting

This commit is contained in:
George Hunt 2018-05-21 23:28:21 +00:00
parent 732547b9e7
commit e0309cd5d4
10 changed files with 13 additions and 31 deletions

View file

@ -17,7 +17,7 @@
- { path: '/library/dbdata/mongodb' }
- { path: '/var/log/mongodb' }
- name: Create systemd files
- name: Move required files
template: src={{ item.src }}
dest={{ item.dest }}
owner=root
@ -25,9 +25,7 @@
mode=0644
with_items:
- { src: 'mongodb.service' , dest: '/etc/systemd/system/' }
- { src: 'mongodb' , dest: '/etc/sysconfig/'}
- { src: 'mongod.conf' , dest: '/etc/mongod.conf'}
- { src: 'mongod.conf' , dest: '/etc/mongodb.conf'}
- name: enable services
service: name={{ item.name }}
@ -45,20 +43,6 @@
- { name: mongodb }
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 }}"
section=mongodb