feat: added compact memory for virtual machines
Signed-off-by: Louis Vallat <contact@louis-vallat.dev>
This commit is contained in:
parent
83da79bf82
commit
180472bf46
5
compact_mem.yaml
Normal file
5
compact_mem.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: "Compact mem on VMs."
|
||||
hosts: all
|
||||
roles:
|
||||
- compact_mem
|
7
roles/compact_mem/tasks/main.yaml
Normal file
7
roles/compact_mem/tasks/main.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Set cron to compact memory
|
||||
ansible.builtin.cron:
|
||||
name: "compact memory every day"
|
||||
special_time: "daily"
|
||||
job: "echo 1 > /proc/sys/vm/compact_memory"
|
||||
when: compact_mem
|
Loading…
x
Reference in New Issue
Block a user