tuned.conf template: support all plugins, update host_vars

This commit is contained in:
Josh Lay 2024-08-04 14:02:27 -05:00
parent 1cf78fe7fd
commit c08046495c
No known key found for this signature in database
GPG key ID: 47AA304B2243B579
3 changed files with 37 additions and 24 deletions

View file

@ -86,6 +86,8 @@
- "{{ base_profiles }}"
notify: Restart tuned
become: true
tags:
- tuned.conf
- name: Ensure tuned is enabled
ansible.builtin.service:

View file

@ -4,16 +4,18 @@
include={{ item.1 }}
summary={{ item.1 }} + TCP/RAID tweaks + AMDGPU {{ item.0 }}
{% if sysctl is defined %}
[sysctl]
{% for _sysctl, value in sysctl.items() %}
{{ _sysctl }}={{ value }}
{% endfor %}
{% endif %}
# reference/execute AMDGPU control script
# used because some sysfs interfaces are transactional
# cannot be set by a single param in 'tuned'/[sysfs]
[gpuclockscript]
type=script
script=${i:PROFILE_DIR}/amdgpu-clock.sh
{% if plugins is defined %}
{% for section, options in plugins.items() %}
{#+ give each plugin section some space +#}
[{{ section }}]
{% for key, value in options.items() %}
{{ key }}={{ value }}
{% endfor %}
{% endfor %}
{% endif %}