add mongodb role
This commit is contained in:
9
ansible/roles/mongodb/files/disable-thp.service
Normal file
9
ansible/roles/mongodb/files/disable-thp.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Disable Transparent Huge Pages (THP)
|
||||
DefaultDependencies=no
|
||||
After=sysinit.target local-fs.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c 'echo never | tee /sys/kernel/mm/transparent_hugepage/enabled > /dev/null'
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
2
ansible/roles/mongodb/files/local.conf
Normal file
2
ansible/roles/mongodb/files/local.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
vm.swappiness=1
|
||||
vm.max_map_count=128000
|
||||
13
ansible/roles/mongodb/files/logrotate.conf
Normal file
13
ansible/roles/mongodb/files/logrotate.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
/var/log/mongodb/mongod.log {
|
||||
daily
|
||||
rotate 7
|
||||
missingok
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
create 640 mongodb mongodb
|
||||
sharedscripts
|
||||
postrotate
|
||||
/bin/kill -SIGUSR1 `cat /var/run/mongodb/mongod.pid 2>/dev/null` >/dev/null 2>&1
|
||||
endscript
|
||||
}
|
||||
Reference in New Issue
Block a user