Config swappiness

This commit is contained in:
2018-04-29 20:19:32 +02:00
parent d58c6a1b06
commit 05c7785d7c

23
linux/VMSwappiness.sls Normal file
View 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 %}