Pushing local updates/improvements with verbosity
Add more base dist `tuned` profiles, remove unused amdgpu power targets Add a handler to restart tuned on profile/template changes Replace underscores in generated profile paths with dashes, improved interpretation/ordering with `tuned-switcher` Rename `play.yml` -> `playbook.yml` Extend comments to include potential todos RE: automatic discovery
This commit is contained in:
parent
6555c23003
commit
7b4adb2336
1 changed files with 18 additions and 8 deletions
|
@ -3,18 +3,27 @@
|
||||||
become: yes
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
card: card0 # default to card0
|
card: card0 # default to card0
|
||||||
base_profiles: # standard tuned profiles available on Fedora
|
base_profiles: # standard tuned profiles available on Fedora, should dynamically discover?
|
||||||
|
- balanced
|
||||||
- desktop
|
- desktop
|
||||||
|
- latency-performance
|
||||||
- network-latency
|
- network-latency
|
||||||
|
- network-throughput
|
||||||
- powersave
|
- powersave
|
||||||
|
- virtual-host
|
||||||
amdgpu_profiles: # statically defined mapping of the contents in /sys/class/drm/{{ card }}/device/pp_power_profile_mode
|
amdgpu_profiles: # statically defined mapping of the contents in /sys/class/drm/{{ card }}/device/pp_power_profile_mode
|
||||||
- { name: 'bootup_default', value: 0 }
|
# - { name: 'bootup_default', value: 0 }
|
||||||
- { name: '3D_fullscreen', value: 1 }
|
# - { name: '3D_fullscreen', value: 1 }
|
||||||
- { name: 'powersaving', value: 2 }
|
- { name: 'powersaving', value: 2 }
|
||||||
- { name: 'video', value: 3 }
|
- { name: 'video', value: 3 }
|
||||||
- { name: 'VR', value: 4 }
|
- { name: 'VR', value: 4 }
|
||||||
- { name: 'compute', value: 5 }
|
# - { name: 'compute', value: 5 }
|
||||||
- { name: 'custom', value: 6 }
|
# - { name: 'custom', value: 6 }
|
||||||
|
handlers:
|
||||||
|
- name: restart tuned
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: tuned
|
||||||
|
state: restarted
|
||||||
tasks:
|
tasks:
|
||||||
- name: ensure tuned is installed
|
- name: ensure tuned is installed
|
||||||
package:
|
package:
|
||||||
|
@ -23,7 +32,7 @@
|
||||||
- name: create custom profile directories
|
- name: create custom profile directories
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: /etc/tuned/{{ item.1 }}_amdgpu_{{ item.0.name }}
|
path: /etc/tuned/{{ item.1 }}-amdgpu-{{ item.0.name }}
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ amdgpu_profiles }}"
|
- "{{ amdgpu_profiles }}"
|
||||||
|
@ -31,10 +40,11 @@
|
||||||
- name: template custom tuned profiles
|
- name: template custom tuned profiles
|
||||||
template:
|
template:
|
||||||
src: templates/tuned.conf.j2
|
src: templates/tuned.conf.j2
|
||||||
dest: /etc/tuned/{{ item.1 }}_amdgpu_{{ item.0.name }}/tuned.conf
|
dest: /etc/tuned/{{ item.1 }}-amdgpu-{{ item.0.name }}/tuned.conf
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_nested:
|
with_nested:
|
||||||
- "{{ amdgpu_profiles }}"
|
- "{{ amdgpu_profiles }}"
|
||||||
- "{{ base_profiles }}"
|
- "{{ base_profiles }}"
|
||||||
|
notify: restart tuned
|
Loading…
Reference in a new issue