mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added ansible play to configure swappiness
This commit is contained in:
24
ansible/swappiness.configure.yml
Normal file
24
ansible/swappiness.configure.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Configure swappiness
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- configuration
|
||||||
|
- configure
|
||||||
|
- swappiness
|
||||||
|
hosts: all
|
||||||
|
vars:
|
||||||
|
swappiness_sysctl_file: "/etc/sysctl.d/{{ swappiness_sysctl_file_priority }}-{{ swappiness_sysctl_file_name }}.conf"
|
||||||
|
swappiness_sysctl_file_name: swappiness
|
||||||
|
swappiness_sysctl_file_priority: 99
|
||||||
|
swappiness_value: 10
|
||||||
|
tasks:
|
||||||
|
- when: ansible_system == 'Linux'
|
||||||
|
tags: linux
|
||||||
|
block:
|
||||||
|
- name: Configure swappiness
|
||||||
|
sysctl:
|
||||||
|
name: vm.swappiness
|
||||||
|
value: "{{ swappiness_value|string }}"
|
||||||
|
sysctl_file: "{{ swappiness_sysctl_file }}"
|
||||||
|
sysctl_set: true
|
||||||
Reference in New Issue
Block a user