diff --git a/roles/tuned_amdgpu/tasks/main.yml b/roles/tuned_amdgpu/tasks/main.yml index 18c3377..4cc4e42 100644 --- a/roles/tuned_amdgpu/tasks/main.yml +++ b/roles/tuned_amdgpu/tasks/main.yml @@ -15,6 +15,7 @@ - {name: 'power-profiles-daemon', state: 'absent'} - {name: 'tuned', state: 'present'} when: + - ('power-profiles-daemon' in ansible_facts.packages) or ('tuned' not in ansible_facts.packages) - ansible_distribution == 'Fedora' - ansible_distribution_major_version|int > 35 register: fed_ppdtuned_swap @@ -46,8 +47,8 @@ become: true - name: Copy 'common' AMDGPU script for all profiles - ansible.builtin.template: - src: profile-common.sh.j2 + ansible.builtin.copy: + src: profile-common.sh dest: "/etc/tuned/{{ item.1 }}-amdgpu-{{ item.0 }}/amdgpu-common.sh" mode: "0644" # sourced, doesn't require executable bit owner: root @@ -87,12 +88,3 @@ name: tuned enabled: true become: true - -- name: Copy gamemode memlock limits.d booster - become: true - ansible.builtin.template: - src: etc.security.limits.d.99-gamemode-memlock.conf - dest: /etc/security/limits.d/99-gamemode-memlock.conf - owner: root - group: root - mode: '0644' diff --git a/roles/tuned_amdgpu/templates/etc.security.limits.d.99-gamemode-memlock.conf b/roles/tuned_amdgpu/templates/etc.security.limits.d.99-gamemode-memlock.conf deleted file mode 100644 index 65ed9f4..0000000 --- a/roles/tuned_amdgpu/templates/etc.security.limits.d.99-gamemode-memlock.conf +++ /dev/null @@ -1,3 +0,0 @@ -{{ ansible_managed | comment }} -@gamemode soft memlock 1048576 -@gamemode hard memlock 1048576 diff --git a/roles/tuned_amdgpu/templates/profile-common.sh.j2 b/roles/tuned_amdgpu/templates/profile-common.sh.j2 index 8a186fc..5970513 100644 --- a/roles/tuned_amdgpu/templates/profile-common.sh.j2 +++ b/roles/tuned_amdgpu/templates/profile-common.sh.j2 @@ -1,5 +1,5 @@ #!/bin/bash -{{ ansible_managed | comment }} +# # 'common' file sourced by other scripts under tuned profile # # dynamically determine the connected GPU using the DRM subsystem diff --git a/roles/tuned_amdgpu/templates/tuned.conf.j2 b/roles/tuned_amdgpu/templates/tuned.conf.j2 index 3237eb3..a10ec3e 100644 --- a/roles/tuned_amdgpu/templates/tuned.conf.j2 +++ b/roles/tuned_amdgpu/templates/tuned.conf.j2 @@ -1,5 +1,3 @@ -{{ ansible_managed | comment }} - [main] include={{ item.1 }} summary={{ item.1 }} + TCP/RAID tweaks + AMDGPU {{ item.0 }}