Config swappiness
This commit is contained in:
23
linux/VMSwappiness.sls
Normal file
23
linux/VMSwappiness.sls
Normal file
@@ -0,0 +1,23 @@
|
||||
{% if grains['kernel'] == 'Linux' %}
|
||||
{% if grains['virtual'] == 'qemu' %}
|
||||
/etc/sysctl.conf:
|
||||
file.append:
|
||||
- makedirs: True
|
||||
- text: vm.swappiness = 1
|
||||
{% elif grains['virtual'] == 'LXC' %}
|
||||
/etc/sysctl.conf:
|
||||
file.append:
|
||||
- makedirs: True
|
||||
- text: vm.swappiness = 5
|
||||
{% elif grains['os'] == 'Fedora' %}
|
||||
/etc/sysctl.conf:
|
||||
file.append:
|
||||
- makedirs: True
|
||||
- text: vm.swappiness = 10
|
||||
{% elif grains['os'] == 'CentOS' %}
|
||||
/etc/sysctl.conf:
|
||||
file.append:
|
||||
- makedirs: True
|
||||
- text: vm.swappiness = 25
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user