giovtorres.tuned
Ansible Role: Tuned
This role installs and sets up the tuned service to help optimize system settings. It works on EL7.
Requirements
No special requirements.
Role Variables
The built-in profiles available on EL7 are:
- balanced
- desktop
- latency-performance
- network-latency
- network-throughput
- powersave
- throughput-performance
- virtual-guest
- virtual-host
You can change the active tuned profile to one of the built-in profiles above:
tuned_active_builtin_profile: "throughput-performance"
You can also create your own custom tuned profile. See the example below for details:
tuned_active_custom_profile: ""
Dependencies
No dependencies.
Example Playbooks
To use the default profile, throughput-performance
, simply apply the role:
- hosts: servers
roles:
- giovtorres.tuned
To use a different built-in profile, set the variable tuned_active_builtin_profile
:
- hosts: servers
vars:
tuned_active_builtin_profile: "virtual-guest"
roles:
- giovtorres.tuned
To create a custom profile, use the tuned_active_custom_profile
variable, including name and sections items. The sections should define the section name in the config file and a list of option/value pairs for that section.
- hosts: all
vars:
tuned_active_custom_profile:
name: my_custom_profile
sections:
- name: main
params:
- option: summary
value: Test
- option: include
value: throughput-performance
- name: sysctl
params:
- option: vm.dirty_ratio
value: 30
- option: vm.swappiness
value: 30
- name: vm
params:
- option: transparent_hugepages
value: never
roles:
- giovtorres.tuned
The above playbook will produce the following configuration output:
[main]
summary=Test
include=throughput-performance
[sysctl]
vm.dirty_ratio=30
vm.swappiness=30
[vm]
transparent_hugepages=never
License
BSD
Installs and configures tuned, a system tuning tool.
ansible-galaxy install giovtorres.tuned