diff --git a/roles/tuned_amdgpu/defaults/main.yml b/roles/tuned_amdgpu/defaults/main.yml index 92ffeee..fe05157 100644 --- a/roles/tuned_amdgpu/defaults/main.yml +++ b/roles/tuned_amdgpu/defaults/main.yml @@ -11,4 +11,4 @@ amdgpu_profiles: - overclock - peak -tuned_amdgpu_profile_dir: '/etc/tuned/profiles' # introduced in '2.23.0-1' +tuned_amdgpu_profile_dir: "{{ '/etc/tuned' if ansible_facts['packages']['tuned'][0]['version'] is version('2.23.0', '<') else '/etc/tuned/profiles' }}" diff --git a/roles/tuned_amdgpu/tasks/main.yml b/roles/tuned_amdgpu/tasks/main.yml index fa1fc5c..6167ab0 100644 --- a/roles/tuned_amdgpu/tasks/main.yml +++ b/roles/tuned_amdgpu/tasks/main.yml @@ -5,11 +5,6 @@ ansible.builtin.package_facts: manager: auto -- name: Use legacy custom-profile directory when < 2.23.0 - ansible.builtin.set_fact: - tuned_amdgpu_profile_dir: "/etc/tuned" - when: ansible_facts['packages']['tuned'][0]['version'] is version('2.23.0', '<') # versions are in a list...? pick the first; only expect one - # around Fedora 35/36, the packages for 'power-profiles-daemon' and 'tuned' conflicted; no more - can coincide # ensuring the service is masked should suffice - not removed; gnome/others may 'require' it. doing so may remove them implicitly - name: Ensure power-profiles-daemon is off/disabled/masked